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 Development (2000)
 Alter Column datatype

Author  Topic 

pulavarthipraveen
Starting Member

1 Post

Posted - 2008-05-29 : 03:13:37
When I tried to change the datatype of the column through
"Alter table tablename Alter column columnname Newdatatype" query
it's is throw the error below:
"The index 'IndexName' is dependent on column 'columnname'" .

But it allowed me to change the column datatype through Enterprise Manager Table Designer without any restictions.

1) What is the reason for having the difference between 2 approaches?

2) How can we change by the query the datatype of the column when some of the indexes are dependent on the column. Let me know the correct syntax.

Plz answer my query.

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-05-29 : 03:36:27
EM was probably dropping and re-creating (or disabling/enabling) the index in the background. Using QA you'll have to replicate that process manually.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-29 : 06:14:16
Look into the books online about CREATE INDEX,DROP INDEX statement.
Go to Top of Page
   

- Advertisement -