October 7, 2010 at 4:13 am
I have a MySQL database linked to a SQL Server 2005 database. Everything seems to work fine until I include USER in a query. I have modeled the queries in the MySQL workbench and they work fine. In all cases, USER is qualified (e.g. table.USER) or LinkedServerName...USER as I have both columns and a table named USER).
In all cases the error is invalid syntax near USER. Queries as simple as select * from LINKEDNAME...USER fail.
All names in MySQL are upper case and I have confirmed that it is not a case sensitivity issue.
I know, this sounds very weird, so any ideas would be most welcome.
TIA
John
October 7, 2010 at 4:27 am
John USER is a keyword in SQL, can you try wrapping the tablename in brackets or double quotes?
select * from LINKEDNAME...
select * from LINKEDNAME..."USER"
does it work that way?
Lowell
October 7, 2010 at 5:15 am
Thank you, yes. Just before I saw your reply, the brain fog cleared and I came to the same conclusion.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply