Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count() in SQL??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Count() in SQL??
Divers
Thread ID:
00128117
Message ID:
00128117
Vues:
58
Good morning,

I have a little SQL dilemma. I have a DO CASE...ENDCASE with 2 SQL queries per case, each going to a different cursor. My boss wants 2 record counts from the master table, based on 2 conditions. Is there any way to do that within one or both of the SQl statements??

Example
SELECT ass_l_ata,s_or_type FROM temp ;
INTO TABLE cleared ;
WHERE s_status = 'Cleared' ;
ORDER BY ata

lnClearedCount = RECCOUNT()

SELECT ass_l_ata,s_or_type FROM temp ;
INTO TABLE outstanding ;
WHERE NOT s_status = 'Cleared' ;
ORDER BY ata
lnOutstandingCount = RECCOUNT()

The conditions are set on the s_or_type field where I need to count 2 of the 3 possible types.

Perry
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform