Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum and count
Message
De
02/02/2011 14:07:04
 
 
À
02/02/2011 13:36:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01498370
Message ID:
01498385
Vues:
43
thank you very much it works,

>>hi all,
>>i get result from table mucurtw as ex..
>>
>>empnam,empno, typ1,total_cfil
>>a       1     20    1
>>a       1     20    3 
>>a       1     20    1
>>a       1     20    2
>>a       1     18    10 
>>a       1     18    32
>>b
>>b
>>c
>>c
>>..
>>..
>>***********************
>>i need result from table mucurtw to new table or cursor sum typ1 and count typ1 it all fields is CHR type as..
>>empnam,empno, typ1,newtotal_cfil,count1
>>a      1      20      7            4
>>a      1      18      42           2
>>.
>>.
>>
>>
>>thanks
>
>
>SELECT empnam, empno, typ1, ;
>               CAST(SUM(total_cfil)  AS C(20)) as Newtotal_cfil, ;
>               CAST(CNT(*) AS C(20))AS count1 ;
>  FROM mucurtw ;
>  GROUP BY empnam, empno, typ1 ;
>  INTO CURSOR csrResult
>
>
>Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform