Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Originally opened accounts
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
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01101049
Message ID:
01101056
Vues:
12
Your question isn't clear because you didn't say wich fields tells when account was opended. Also, AFAIKS
iOpened = iTotal - iClosed
>
>I'd like to get statistics about accounts for particular batch. Some accounts were automatically closed on the day they were imported (could be various reasons - usually unsufficient balance).
>
>Bellow is my code:
>
>TEXT TO lcSQLStr TEXTMERGE noshow
>	SELECT ;
>	CAST(SUM(IIF(BETWEEN(tResolution_Date,##START_DATE##,##END_DATE##),1,0)) AS I) as iOriginally_Closed, ;
>	CAST(SUM(IIF(ISNULL(cResolution_Codes_Fk) ,0,1)) AS I) as iClosed, ;
>	CAST(SUM(IIF(ISNULL(cResolution_Codes_Fk),1,0)) AS I) as iOpened, ;
>	CAST(COUNT(*) AS I) as iTotal ;
>	FROM Trans WHERE iBatch_Number = <<m.tiBatch_Number>>	
>endtext
>lcSQLStr = STRTRAN(m.lcSQLStr, '##START_DATE##', m.lcStart_Date)
>lcSQLStr = STRTRAN(m.lcSQLStr, '##END_DATE##', m.lcEnd_Date)
>=RunSQL(m.lcSQLStr, 'c_BatchStatistics')
>
>E.g. I easily can get accounts closed on the particular day, but how can I get accounts opened on this day? Only Total - Closed?
>
>Any ideas?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform