Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using variables in SELECT command
Message
From
07/07/1998 10:10:27
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
 
To
07/07/1998 09:58:16
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00114850
Message ID:
00114865
Views:
18
>Hi Mandy,
> What errors are you getting? What is the content of the variables?
> Keep in mind that if you are instructing SQL to place a file in a non-existent subdirectory, SQL will fail--it will not automatically create the subdirectory. Your syntax looks fine and what you are trying to do should work. Your error is probably in the contents of your variables. I suggest halting the execution of the program just before the SQL Select statement and examining the contents of the variables. That will probably point you to the problem.
> Regards, Chaim

Hi Chaim,
The error I'm getting is "Command contains unrecognized phrase/keyword". Here's my Select statement exactly:

SELECT * FROM &y INTO TABLE c:\ird96\surveys\&x\&y WHERE acode=&x

y=SYSTEM (the name of one of my files), x=00640 (char string & code for one of my agencies), and I do have a c:\ird96\surveys\00640 directory before running the command.

Will my 'WHERE acode=&x' realize that &x is a character string, not a number?

I just tried doing the above but using the actual values (SYSTEM & 00640) in place of the variables and it works fine.

Any ideas?

Mandy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform