Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parametrized view based on logical field
Message
De
19/10/2004 13:08:42
 
 
À
19/10/2004 12:16:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00952678
Message ID:
00952712
Vues:
10
>hi!
>I have a logical field project.terminated
>
>I would like to create a parametrized view that will permit me
>1. select only terminated projets.
>2. select only not terminated projects.
>3. select all projects.

Unless you're willing to use NULLs as the parameter value for "all projects", (Which I'm not sure VFP will allow), you'd have to use two parameters to test this.
Select * from mytable where ISNULL(?vp_terminated) OR (mytable.terminated = ?vp_terminated)

Select * from mytable where IIF(?vp_allprojects,.T.,.F.) OR (mytable.terminated = ?vp_terminated)
Chris.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform