Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to alias SQL column - reserved word
Message
De
15/09/2008 16:00:39
 
 
À
15/09/2008 15:47:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01347748
Message ID:
01347749
Vues:
12
This message has been marked as the solution to the initial question of the thread.
>An existing non changeable table has a column defined as DESC which is a reserved word. When I try to run the SQL UPDATE statement it fails.
>
>I tried SET [desc] = "zzz"
>
>Tried a macro no luck
>
>CREATE CURSOR xx ( desc v(10))
>INSERT INTO xx values('11111')
>UPDATE xx SET desc = "zzz" --- this line does not work
>
>How can I get around this?

Below works with your test cursor, you'd have to try it in your real app:
UPDATE xx SET xx.desc = "zzz"
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform