Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2800

Re: Invoice Reconciliation Query

$
0
0

Thanks Bharathiraja for the help.

 

With your advice I came up with the following query:

 

SELECT T0.[DocNum] AS 'Document Number',

T0.[DocDate] AS 'Date',

T0.[CardCode] AS 'Customer Code',

T0.[CardName] AS 'Customer',

T0.[DocTotal] AS 'Invoice Total',

T0.[PaidToDate] AS 'Total Payment',

T0.[DocTotal] - T0.[PaidToDate] AS 'Outstanding Amount',

CASE WHEN T0.[DocTotal] = T0.[PaidToDate] THEN 'Fully received' WHEN T0.[PaidToDate] > 0 THEN 'Partially Received' ELSE 'Not Received' END STATUS

FROM OINV T0

WHERE T0.[CANCELED] = 'N' and T0.[DocDate] >= [%0] and T0.[DocDate] <= [%1]

 

However when I ran the query in the production database it came up with a error stating that SAP had run out of memory and had to close.

 

Could the issue be related to my query above in that it pulls the data inefficiently from the SQL database?


Viewing all articles
Browse latest Browse all 2800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>