Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variables in sql statements
Message
 
 
À
16/03/2002 22:32:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00633846
Message ID:
00633847
Vues:
20
You can just use a variable
gcNext_Uniq = 451001830
UPDATE suniq ;
 SET nextuniq = gcNext_Uniq ;
 WHERE TblName = 'Studemo'
BTW, there's no reason to use public variables in your programs.

>Hello Group,
>
>I would like to use a variable in an update SQL
>
>Public gcNext_Uniq
>
>gcNext_Uniq = 451001830
>
> UPDATE suniq;
> SET nextuniq = &gcNext_Uniq;
>WHERE TblName = 'Studemo'
>
>Doesn't work.
>
>How do I get the SQL to take a parameter?
>
> UPDATE suniq;
> SET nextuniq = 451001830;
>WHERE TblName = 'Studemo'
>
>Works fine
>
>Thanks much
>Jim
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform