Using Query Analyzer, I am getting some results I have not seen before.
Any help that you can offer would be greatly appreciated.
Adding the Column works fine:
Attempting to drop a column in a valid table using;Code:ALTER TABLE [dbo].[tblSaleItem] ADD [Temp_Qty] [float] DEFAULT 0 NOT NULL
Gets the following error:Code:ALTER TABLE [dbo].[tblSaleItem] DROP COLUMN [Temp_Qty]
Server: Msg 5074, Level 16, State 1, Line 1
The object 'DF__tblSaleIt__Temp___07EC11B9' is dependent on column 'Temp_Qty'.
Server: Msg 4922, Level 16, State 1, Line 1
ALTER TABLE DROP COLUMN Temp_Qty failed because one or more objects access this column.
When I add the new column it appears to automatically add the default constraint shown above (DF__tblSaleIt__Temp___07EC11B9)
I just add the column and then try to drop it as a test and it causes this error.




Reply With Quote