Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create newtable
Message
 
À
16/08/2011 08:10:46
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:
01521078
Message ID:
01521079
Vues:
76
This message has been marked as the solution to the initial question of the thread.
>hi all,
>
>i need help to create new table have records as..
>
>*mytable
>empno      file       no           val1        val2      
>1              2         6             500         80
>1              2        28            100         50
>1              3        10            200         70
>2              2          8            100        40
>2              4        18            150        60
>
>
>
>*result new cursor or table
>
>empno     count1   file          no       val1        val2      sum1(val1+val2)    
>1               3          7           44       800         200           1000                
>2               2          6           26       250        100            350
>
>
>thanks
SELECT EmpNo,;
       COUNT(*)  AS Count1,;
       SUM(File) AS File1,;
       SUM(No)   AS No,;
       SUM(val1) AS val1,;
       SUM(val2) AS val2,;
       SUM(val1+Val2) AS Sum1;
FROM YourTable;
GROUP BY EmpNo;
INTO CURSOR crsTest 
BROW NORMAL
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform