Change field name in Pass Through query

Tiger955

Registered User.
Local time
Today, 20:21
Joined
Sep 13, 2013
Messages
140
Hi!

I have a problem and do not know how to solve it.

In a table of a SQL-Server 2008 I have a fieldname "Alter", the German word for age.

When sending a PT-qry to the server I get an error
"Incorrect syntax near the keyword 'Alter'"

Even when I try to set "Select tblmytable.Alter as Age" I get the same error.

To change the fieldname is almost impossible, as there is to much code to change.

Any idea, how to solve this?

Thanks
Michael
 
Alter is a reserved word as in ALTER TABLE. It really should never be used as a fieldname.

If you must then put square brackets around it.
 
Thanks, I found a solution by tblmytable.[Alter].

In future I will omit reserved words - for sure.
 

Users who are viewing this thread

Back
Top Bottom