Link to home
Start Free TrialLog in
Avatar of DougC
DougC

asked on

SQL Server 2000 Rename DB with illegal character

Need an answer fast to this question.

I created a database with a - ("dash") in the name. The ultimate sin! If its such a sin it should not allow you to create it. You get no error when you create it which is really stupid if you ask me.

Help!! Please!! I need to rename the database I want to change the - to an _ which I think is legal. Any ideas on how? I tried ALTER DATABASE MODIFY NAME= , but it gives me an error "error near -". SQL Server 2000. I even tired a proc, but it got the same error. Has anyone ever done this before???

Doug
ASKER CERTIFIED SOLUTION
Avatar of syntnx
syntnx

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WinstonRaja
WinstonRaja

Hi

Alternatively you can use [ ]  brace to overcome these errors