Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aged Receivables
Message
From
07/06/2001 13:37:09
 
 
To
07/06/2001 13:26:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00516493
Message ID:
00516500
Views:
9
This message has been marked as the solution to the initial question of the thread.
>I am trying to calculate the cost of aged receivables in different time >ranges. I want the total costs of receivables in the last 30 days, 31-60 days, >61-90 days and 91 and over depending on the date specified which will be most >of the time today's date. I don't know how to create a SQL statement that >would do this as a new year creates problems in determing the number of days >ago it happened. I hope that makes sense. I'm having troubles getting my head >around it and explaining it.

>TIA,
>Tyler

Select Sum(iif(Date() - DateReceivable < 30, CostReceivable, 0000000.00)) as nCost30, Sum(iif(Between(Date() - DateReceivable, 31, 60), CostReceivable, 0000000.00)) as nCost3160, Sum(iif(Between(Date() - DateReceivable, 61, 90), CostReceivable, 0000000.00)) as nCost6190, Sum(iif(Date() - DateReceivable > 91, CostReceivable, 0000000.00)) as nCost91 ...

I think will help you

Philippe
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform