1

I'm trying to clean up a database table and I'd really like to drop two columns as they should no longer be being used.

'Property' table - Unable to modify table. The index '_dta_index_Property_7_669245439__K1_K9_K8_K24_K4_2_5_6_13_22_25_26_29' is dependent on column 'AveragePriceMta'. The index '_dta_index_Property_7_669245439__K1_K9_K8_K24_2_4_5_6_7_13_22_25_26_29' is dependent on column 'AveragePriceMta'. ALTER TABLE DROP COLUMN AveragePriceMta failed because one or more objects access this column. 

I've gone and looked at the indexes for this table found the particular columns I want to delete in a greyed out field of "Included columns". Obviously I don't want to just drop these indexes - but is there a way to refresh the index so that I can remove the columns in question out of the non-editable included columns field?

Using SQL Server 2008 but database is 2005.. in case that matters.

Thanks for your help! :)

1
  • 3
    What happened to your caps lock key when you are typing your question title? Commented Jun 22, 2010 at 7:02

1 Answer 1

9

You can't add or remove columns to an Index. You will have to drop the index and the re-create it.

You can you use Create Index along with the Drop_Existing clause to do this.

MS Help on Create Index

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.