General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Hi
I have finding a solution for this one:
From a table containing customer numbers and total due i need to create a stored procedure or an sql statement creating the ageing of the total due.
Our 3 Tables are
Customers: Account, TotDue
Current transactions: Account, InvoiceNo, Date, Amount
Transaction History : Account, InvoiceNo, Date, Amount
Starting with current transactions, then if neccessary, go to the history file. i need to get a cursor with invoice amounts in the appropriate columns, up to the total due.
The cursor i need back would look like this:
Account, Current, t30Day, t60Days, t90Days, t120Days
The problem is both the current transaction file and the history file have millions of records.
We are using SQL Server 2000.
Thanks for any help.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only