dbTalk Databases Forums  

Error renaming field in SQL command

comp.databases.btrieve comp.databases.btrieve


Discuss Error renaming field in SQL command in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MWCI
 
Posts: n/a

Default Error renaming field in SQL command - 07-06-2003 , 10:28 AM






Hi,
I am trying to select specific records in a Pervasive 2000 table using a SQL
command.
The command is :

SELECT name AS customer, desc AS description FROM tblroll

However, it gives a syntax error. It seems that "desc" is a reserved word.
Unfortunately I do not have the luxury of changing the field name as I am
simply connecting to a database from another application to manipulate the
results for my own application.
Does anyone have any ideas on how I may choose this specific field from the
table?

Thanks in advance.

H.M.L.W.



Reply With Quote
  #2  
Old   
Mirtheil
 
Posts: n/a

Default Re: Error renaming field in SQL command - 07-06-2003 , 09:32 PM






You'll need to enclose the field name in double quotes:
SELECT name AS customer, "desc" AS description FROM tblroll
That will allow you to access the field.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.