Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need some help with macro-substitutions in SQL-statement
Message
De
15/06/2001 04:40:27
 
 
À
15/06/2001 03:32:24
Eugene Kolmakov
Millennium Technologies
Vladivostok, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00519841
Message ID:
00519846
Vues:
15
Eugene,
There are different ways to do this:
cond1 = [ MyField1 = MyCond1 ]
cond2 = [ AND MyField2 = MyCond2 ]
condn = [ AND MyField3 = MyCond3 ]

SELECT * FROM < My Table > WHERE &cond1 &cond2 &condn
or
lcWhere = [ WHERE MyField1 = MyCond1 ]+;
          [ AND MyField2 = MyCond2 ]+;
          [ AND MyField3 = MyCond3 ]

SELECT * FROM < My Table > &lcWhere
HTH

>I need to build SQL-statement and the problem is that I have too many conditions in WHERE-clause. I try to store them in some variables and then use the "&a1.a2.a3..." expression to append conditions in a query. But it generates error message during execution. Maybe anybody knows the way to solve this problem ?
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform