Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complex accounting report for 'As of' date
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01375665
Message ID:
01375943
Vues:
11
>>It's not really an accounting report, the report is called "synopsis". We got almost all numbers sum up fine except for one category which is a bit off and it's very hard to reconcile what fell into the cracks.
>
>What category?

Is there a way to get sum for accounts and not payments in this kind of the select statement

SELECT COUNT(distinct myField) as iAccounts, ;
SUM(IIF(ISNULL(dPosting_Date) AND iClosed = 1,1,0)) as iClosedNoPayments, ;
SUM(IIF(ISNULL(dPosting_Date) AND iClosed = 1,0,1)) as iClosedWithPayments, ;
SUM(IIF(ISNULL(dPosting_Date) AND iClosed = 0,1,0)) as iOpenNoPayments, ;
SUM(IIF(ISNULL(dPosting_Date) AND iClosed = 0,0,1)) as iOpenWithPayments,

Count distinct works, but I also want sum to be for accounts and not for payments.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform