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.
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-ASand 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_ASKristen |
 |
|
duhaas
Constraint Violating Yak Guru
310 Posts |
Posted - 2007-03-09 : 15:58:33
|
arrghhhhh, im an idiot, thanks! |
 |
|
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 |
 |
|
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 |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-03-10 : 03:17:57
|
"Your database name contains a '-'"Hahaha! I'm blind as a bat .... |
 |
|
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? |
 |
|
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 |
 |
|
|
|
|