Showing posts with label prd3. Show all posts
Showing posts with label prd3. Show all posts

Thursday, March 22, 2012

escape character for '\' in SQL server 2000

Hello Experts,

We have a SQL server which we have with the name 'SELDSQL533\PRD3', on another server i am trying to create a synonym for a particular database and table inside it. but i get a below error for '\'

Is there any escape character to be used to overcome this problem

CREATE SYNONYM Project

FOR SELDSQL533\PRD3.DMS_copy.project

--

Error: Msg 102, Level 15, State 1, Line 2

Incorrect syntax near '\'.

-

/chandresh

use the following query...

CREATE SYNONYM Project

FOR [SELDSQL533\PRD3].DMS_copy.dbo.project

|||

Use square brackets [ ] around any name that contains 'unacceptable' characters.

CREATE SYNONYM Project

FOR [SELDSQL533\PRD3].DMS_copy.project