Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's tripping me up here?
Message
De
08/03/2002 10:39:24
 
 
À
08/03/2002 09:58:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00629884
Message ID:
00630218
Vues:
25
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.
>>
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform