General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only