The name of a link server in sys.servers has a \ in it. When I try to pass that to openquery() it gives a syntax error. I've tried escaping it with another \ with no luck. Any ideas on how I can get openquery() to work where the linked server name has a \ in it?
Asked
Active
Viewed 161 times
-1
-
3Did you try wrapping the server name with brackets? http://stackoverflow.com/questions/2549313/how-to-reference-a-sql-server-with-a-backslash-in-its-name – LittleBobbyTables - Au Revoir May 28 '14 at 18:56
-
Are you using the linked server name in your query (i.e: not the physical name)? – David Brabant May 28 '14 at 18:58
-
1It is a sql or c # problem? – Mihai May 28 '14 at 18:58
-
1http://stackoverflow.com/questions/794095/sql-connect-to-linked-server-with-named-instance – David Brabant May 28 '14 at 19:00