PaulBrown1965
MIS
I need to extract the same data set as the AR Aging report using SQL SELECT statement. Below is my SQL SELECT statement. I have been looking through the arrept.prg file but cant find the missing piece. I am returning too many records that the ar aging report does not have. I am using VBS to create the data set.
sql="Select CUSTNO,INVNO,INVDTE,BALANCE,PNET,ARSTAT"&_
" INVAMT,DTEPAID,ARTYPE,SALESMN,ORNUM,PONUM,REFNO"&_
" from ARYMST01 where balance <> 0 and arstat <> 'V' "&_
" union "&_
" Select CUSTNO,INVNO,INVDTE,BALANCE,PNET,ARSTAT"&_
" INVAMT,DTEPAID,ARTYPE,SALESMN,ORNUM,PONUM,REFNO"&_
" from ARMAST01 where balance <> 0 and arstat <> 'V' "&_
" order by CUSTNO"
thank you
Paul
sql="Select CUSTNO,INVNO,INVDTE,BALANCE,PNET,ARSTAT"&_
" INVAMT,DTEPAID,ARTYPE,SALESMN,ORNUM,PONUM,REFNO"&_
" from ARYMST01 where balance <> 0 and arstat <> 'V' "&_
" union "&_
" Select CUSTNO,INVNO,INVDTE,BALANCE,PNET,ARSTAT"&_
" INVAMT,DTEPAID,ARTYPE,SALESMN,ORNUM,PONUM,REFNO"&_
" from ARMAST01 where balance <> 0 and arstat <> 'V' "&_
" order by CUSTNO"
thank you
Paul