Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using option button in sql
Message
De
16/04/2008 12:35:16
 
 
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 9 SP2
OS:
Vista
Database:
MS SQL Server
Divers
Thread ID:
01311140
Message ID:
01311187
Vues:
27
>I am using with set filter command like this.
>
> If thisform.optionbuttion.value=1
>set filter to sex=1
>endif
> If thisform.optionbuttion.value=2
>set filter to sex=2
>endif
> If thisform.optionbuttion.value=3
>set filter to sex=3
>endif
>but now i want to use in sql

You could use the same approach:
DO CASE
   CASE thisform.optionbuttion.value=1
        SELECT ..... WHERE Sex = 1
   CASE thisform.optionbuttion.value=2
        SELECT ..... WHERE Sex = 2
OTHERWISE
        SELECT .....
ENDCASE
That is compilation of Naomi and Sergey's suggestions :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform