So lets try removing some of those quotes: OLE DB provider “MSDASQL” for linked server “LINKEDSERVER” returned message “Syntax error in SQL statement at or about ” (10713)”. SELECT * FROM OPENQUERY (, ‘select * from pub.”table” where “date” = ‘ ) So the theory to pass a variable in for the date is: SELECT * FROM OPENQUERY(, ‘select * from pub.”table” where “date” = ”” ‘) In my case I wanted to pass a variable which just happened to be a date, but just kept getting error after error. For anyone who has had to use a linked server in SQL and the OPENQUERY command, there are a lot of posts out there that can help you, but when you add in that OpenEdge is the linked database, things start getting problematic.
0 Comments
Leave a Reply. |