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)
 Altering a column which has an index defined on it

Author  Topic 

tal_olier
Starting Member

13 Posts

Posted - 2002-09-01 : 08:40:36
Hello,

I'm trying the following test (which works like a charm on Oracle)

create table x1(c1 numeric(10), c2 numeric(5,1))
create index x1_c2_idx on x1(c2)
alter table x1 alter column c2 numeric(9,1)

I get the following error:
Server: Msg 5074, Level 16, State 8, Line 1
The index 'x1_c2_idx' is dependent on column 'c2'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE ALTER COLUMN c2 failed because one or more objects access this column.

Is there a way to alter the column WITHOUT dropping the index ?



Regards,

Tal Olier
otal@mercury.co.il


Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-09-01 : 08:52:54
Please don't cross post!

I have left this one open http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=19371

Damian
Go to Top of Page
   

- Advertisement -