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 |
|
303factory
Starting Member
2 Posts |
Posted - 2011-09-15 : 11:18:58
|
| Hi peeps I'm a bit stuckI need to script a change to a column in a table so it is case sensitive. The following SQL should be able to do itALTER TABLE myTableALTER COLUMN myColumn CHAR(2)COLLATE Latin1_General_CS_ASHowever i get an error saying'The index 'IX_mytable' is dependent on column 'myColumn'I'm assuming I also need some syntax to change the collation in the index but have no idea how to go about doing so. Can anyone help wiht this?303 |
|
|
Kristen
Test
22859 Posts |
Posted - 2011-09-15 : 11:26:58
|
| I think you just need to Drop the index, run your ALTER, and then Re-create the indexYou should be able to script the existing index in SSMS. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-15 : 11:27:53
|
| nope. you need to drop the index prior to altering and recreate it afterwards------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
303factory
Starting Member
2 Posts |
Posted - 2011-09-15 : 11:44:27
|
quote: Originally posted by Kristen I think you just need to Drop the index, run your ALTER, and then Re-create the indexYou should be able to script the existing index in SSMS.
Thank you kindly! |
 |
|
|
|
|
|