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
 SQL Server Administration (2000)
 unable to change collate

Author  Topic 

duhaas
Constraint Violating Yak Guru

310 Posts

Posted - 2007-03-09 : 14:05:17
I issue the following:

ALTER DATABASE adtempus_MI-TR-IMCMACG02 COLLATE SQL_Latin1_General_CP1_CI-AS

and get the following:

incorrect syntax near '-'

Kristen
Test

22859 Posts

Posted - 2007-03-09 : 15:47:19
You need an underscore, not a hyphen:

SQL_Latin1_General_CP1_CI_AS

Kristen
Go to Top of Page

duhaas
Constraint Violating Yak Guru

310 Posts

Posted - 2007-03-09 : 15:58:33
arrghhhhh, im an idiot, thanks!
Go to Top of Page

duhaas
Constraint Violating Yak Guru

310 Posts

Posted - 2007-03-09 : 16:01:20
actually my command doesnt have a - @ the end, still getting the message
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-09 : 21:30:11
Your database name contains a '-' ?

ALTER DATABASE [adtempus_MI-TR-IMCMACG02] COLLATE SQL_Latin1_General_CP1_CI_AS



KH

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-03-10 : 03:17:57
"Your database name contains a '-'"

Hahaha! I'm blind as a bat ....
Go to Top of Page

duhaas
Constraint Violating Yak Guru

310 Posts

Posted - 2007-03-10 : 08:53:49
appreciate that, didnt realize sql didnt like the - in the name. any other things that the - in the name can cause issue with?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-03-11 : 01:13:28
Spaces, most punctuation, initial digits maybe, probably other things as well.

If you are in any doubt just use [MyObjectName]

We have a naming policy of:

Initial letter; then letters, digits, underscores only.

Kristen
Go to Top of Page
   

- Advertisement -