Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show maximum of 3 columns
Message
 
À
17/09/2001 15:43:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00557471
Message ID:
00557827
Vues:
11
Inge,

The others have effectively explained to you how to get around the fact that your database is not well designed. C1, C2, and C3 represent a multivalued attribute of your table and therefore are in violation of the 1st normal form. If you move the values of the 3 C fields to a related child table (named ctable) then your sql becomes;
SELECT Table1.Name, MAX(cTable.Value) ;
  FROM Table1 JOIN cTable ON Table1.ID = cTable.Id ...
Much simpler anmd faster than a seeries of IIF(0 statements in an SQL statement. This one will actually port to SQL Server or Oracle.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform