Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Easy Question (I Think)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00536048
Message ID:
00536088
Vues:
9
Hi Kirk,
Here are two ways:
1.
CREATE VIEW myView AS SELECT 
 fld1, fld2, ..., 
 <b>IIF(aType = 'C', 'Created', IIF(aType = 'U', 'Updated', 'Deleted')) as action</b>
 FROM mainTable
Obs. This will return Deleted for all records having aType not 'C' or 'U'
2.
Create actTable table with two fields:
aCode char 1 values 'C', 'D', 'U'
aType char 7 values 'Created', ...
and then
CREATE VIEW myView AS SELECT 
 A.fld1, A.fld2,..., B.aType
 FROM mainTable A JOIN actTable B
  ON a.aCode = b.aCode
Doru
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform