Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this possible?..I sure hope so!
Message
De
18/05/1999 22:11:58
 
 
À
18/05/1999 20:25:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00220257
Message ID:
00220279
Vues:
28
Hi Jason ---

Yes. Assume cTable = "voters" and cTableCol = "voters.state"
The SQL becomes:

SELECT * FROM &cTable WHERE &cTableCol = ?lnparentid


>Hello everyone --
>
>My question revolves around the creation of an sql select statement. Can I set a variable on the left hand side of the = sign on a WHERE statement?
>
>I have been able to set the name of a known table and field = to a variable.
>
>Example:
>
>Where voters.state = ?lnparentID
>
>This I have done. I have been able to set the variable equal to a specific table and field and requery the pview to make such a statement work.
>
>However, Let's say I don't know value of what is located in the fieldname I am interested in until run-time. In this case, can I set a variable for the table.fieldname in my WHERE statement?
>
>To sum up> Can I set a variable on the left hand side of the equal sign in my WHERE statement to look at the value for a specific table.fieldname, which is not known until run-time?
>
>Very curious!
>
>TIA for any insight into this question
>
>Jason
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform