Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One Record or All Records in same view.
Message
 
 
À
20/08/2008 18:29:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01340612
Message ID:
01340620
Vues:
13
>I have several view definitions where I'd like to return either a single record, or a group of them(all in some cases), so I can run the same reports and actions against the one/many without creating two versions of everything. Right now, this is accomplished with a WHERE clause of IIF(EMPTY(?vp_PrimaryKey), .T., Table.PrimaryKey = ?vp_PrimaryKey) . The IIF and EMPTY aren't optimizable - is there a better way to do this that is?

Chris,

This is slightly different approach

WHERE (?vp_PK IS NULL or Table.PK = ?vp_PK)
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform