Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL to normalize the data!
Message
De
20/07/1999 22:22:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL to normalize the data!
Divers
Thread ID:
00243953
Message ID:
00243953
Vues:
52
One friend ask me how to convert the non-normalize dbf to standard!
badtable:

StudentID    StudName    Coins      Qty
-----------------------------------------
PJ00001      May         5_Dollar    10
PJ00001      May         2_Dollar     4
PJ00002      John        10_Dollar    6
PJ00002      John        2_Dollar     5
PJ00002      John        1_Dollar     3
PJ00003      Peter       5_Dollar     7
PJ00003      Peter       1_Dollar    15
PJ00004      Susan       10_Dollar    2
PJ00004      Susan       5_Dollar     1
...


GoodTable:

StudentID    StudName    1_Dollar  2_Dollar  5_Dollar  10_Dollar
-----------------------------------------------------------------
PJ00001      May            0         4         10         0
PJ00002      John           3         5          0         6
PJ00003      Peter         15         0          7         0
PJ00004      Susan          0         0          1         2
........
For Report, simply use group can do it, but how to change the table
into this structure na!?

Thanks!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform