Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why?!?! Dependencies out of thin air. 1

Status
Not open for further replies.

twofive

Programmer
Jan 9, 2007
27
US
Lets start with the cryptic error:

The object 'DF__product_t___76630419' is dependent on column 'prod_file_for_download'.

My SQL statement was simply

Code:
ALTER TABLE product_tmp DROP COLUMN prod_file_for_download

Perhaps I have the syntax wrong. What's the SQL syntax to delete a column (not just data but the entire column) within a table? DB = MS SQL Server 2k. Further, there have been zero INSERTions on this table since I ALTERed it ADDing the column 'prod_file_for_download'. So the column doesn't even have any data in it!!
 
Take a look here: thread183-1318509

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks for the link. I googled this, but was unable to find anything like this (including from w/in this forum. I've taken a look at the post from the 4th, but I'm a little confused..

The thing is, *who*/*what* created this "object" in the first place? I want to understand what's going on before I DROP it. Is this like how MS puts all those _vta files everywhere when using frontpage--e.g., for no reason..? I appreciate your help!
 
[Not sure how to edit my previous post.. I meant to say _vti, not _vta] So that's what the "Preview Post" button is for.. *sigh*
 
LOL! If you can't tell, I'm working on someone else's project. You say they used a "wizard" for this production db? ... great ... I'm an OSS guy trying to get used working w/in a MS environment. Guess this project will give me plenty of practice.

Haven't yet touched (much less heard of) "Enterprise Manager". I'll DROP this object as you suggested.

Thanks for your help and patience!
 
It doesn't have to be done through the wizard. Just not specifying a constraint name will do it, too:

Code:
ALTER TABLE product_tmp ADD prod_file_for_download varchar(256) DEFAULT ('')
Will create a constraint name like DF__product_t___76630419 too. The cure is to use CONSTRAINT syntax instead of the shorthand:

Code:
ALTER TABLE product_tmp ADD prod_file_for_download varchar(256) CONSTRAINT DF_product_tmp_defaultprofile DEFAULT ('')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top