« Year End Cash Close | Main | Fwpchkp (cont) »

July 3, 2008

FWPCHKP

Once in awhile checks with multiples print the detail several times. It also doesn't page correctly which is wierd. There's a counter that formats a new page in the while loop that never kicks off. This is driving select statement

EXEC SQL DECLARE cursor_030 CURSOR FOR
select distinct fatckin_vend_inv,
TO_CHAR(fatckin_invh_date, 'DD-MON-YYYY'),
fatckin_net_amt,
FARINVC_VEND_INV_CODE,
TO_CHAR(farvinv_vend_inv_date, 'DD-MON-YYYY'),
farinvc_invh_code,
sum(farinvc_appr_qty * (farinvc_appr_unit_price) + farinvc_addl_chrg_amt - farinvc_disc_amt)
from fatckin,
farvinv,
farinvc x
where fatckin_check_num = :rpt_chk_no_an
and fatckin_invh_code = farinvc_invh_code
and farinvc_invh_code = farvinv_invh_code(+)
and farinvc_vend_inv_code = farvinv_vend_inv_code(+)
and fatckin_vend_inv > rpad(:prev_rpt_vend_inv,25,' ')
and fatckin_vend_inv is NOT NULL
group by fatckin_vend_inv,
fatckin_invh_date,
fatckin_net_amt,
farinvc_vend_inv_code,
farvinv_vend_inv_date ,
farinvc_invh_code
order by farinvc_vend_inv_code;

I just added a nvl to the first value because the loop depends on it having a value.
We'll see if it makes a difference

Posted by wendlerb at July 3, 2008 9:40 AM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?