Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 & sign

Author  Topic 

shzkhan28
Starting Member

15 Posts

Posted - 2009-10-29 : 23:15:37
Hi All,

I have a db name with '&' sign
In use cmd it is giving me following error

USE S&Kltd
error:
Msg 911, Level 16, State 1, Line 1
Could not locate entry in sysdatabases for database 'S'. No entry found with that name. Make sure that the name is entered correctly.

In Oracle,i remember there is set define off cmd to aviod '&'
Ur help will be appreciated.

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-10-30 : 01:14:07
wrap it in square brackets
USE [S&Kltd];

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-30 : 02:37:09
It is bad practice to have such a name. Avoid using non alphabets as part of the object name. You can use underscorwe instead (S_Kltd)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2009-10-30 : 02:54:02
create database [ ]


elsasoft.org
Go to Top of Page

shzkhan28
Starting Member

15 Posts

Posted - 2009-10-30 : 03:15:20
Its working
Thanks...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-30 : 04:16:06
quote:
Originally posted by shzkhan28

Its working
Thanks...


But keep in mind about my first reply

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -