Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aged trial balance
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Aged trial balance
Miscellaneous
Thread ID:
00554942
Message ID:
00554942
Views:
57
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
Map
View

Click here to load this message in the networking platform