Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to alias SQL column - reserved word
Message
From
15/09/2008 16:00:39
 
 
To
15/09/2008 15:47:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01347748
Message ID:
01347749
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform