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
 Transact-SQL (2000)
 Dropping a column

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2006-04-11 : 13:52:47
Guys,

I am trying to drop a column I get this message am I doing something wrong here.

alter table docfees_hist drop column syskey

Server: Msg 5074, Level 16, State 8, Line 1
The statistics 'SYSKEY' is dependent on column 'syskey'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE DROP COLUMN syskey failed because one or more objects access this column.

Any suggestions/inputs would help

Thanks

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-04-11 : 14:29:41
I think that there may be Foreign Key Relationship

Srinika
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-04-11 : 14:35:19
You need to drop the statistics first before dropping the column. Here is the command:

DROP STATISTICS docfees_hist.SYSKEY

Tara Kizer
aka tduggan
Go to Top of Page

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2006-04-11 : 14:42:19
That did the trick

Thanks
Go to Top of Page
   

- Advertisement -