Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's tripping me up here?
Message
From
08/03/2002 10:39:24
 
 
To
08/03/2002 09:58:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00629884
Message ID:
00630218
Views:
30
Hi, Steve,

I may have misstated this but am too lazy to check. You are right that one cannot put quotes around the field names but one can put them around field alias names e.g.

SELECT field AS "field_alias" FROM table

In addition, one can put quotes around the table name.

Why one would want to do this I cannot say. I certainly don't do it. I just found it interesting and loosely relevant to the topic that I recently helped somebody with a query where the query had these quotes and actually worked to my surprise.


>Hello Greg,
>
>Well, I tried to put quotes around the field names, and I get a syntax error.
>
>As it turns out, he is not trying to get VFP data...I guess he is trying to put this SELECT into a string and use ODBC.
>
>>Interestingly, I ran across somebody putting quotes around field alias names. I am guessing this is done in some other product's SQL statements. Much to my surprise, it worked. In VFP -- based on minimal testing purely out of curiousity that these statements worked -- quotes around a field alias or table name will work.
>>
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform