Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variables in sql statements
Message
 
 
To
16/03/2002 22:32:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00633846
Message ID:
00633847
Views:
21
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform