Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Aged Receivables
Message
 
 
À
07/06/2001 13:26:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00516493
Message ID:
00516500
Vues:
10
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform