If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Drop table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-04, 14:33
Rdean Rdean is offline
Registered User
 
Join Date: Nov 2003
Posts: 17
Drop table

Hiya,

I am trouble dropping a table. When I go to drop it I get the error:

[IBM][CLI Driver][DB2/NT] SQL0478N The object type "TABLE" cannot be dropped because there is an object "DB2ADMIN.SQL030331180300279", of type "FUNCTION", which depends on it. SQLSTATE=42893

which is fine, went into syscat.functions, found the function name indicated by the object. Then did 'drop function functionname' at command and it said that the function had been dropped. All Good. Soo, went back to drop the table and it came up with exactly the same error as previously. Went back to syscat.functions and the function is still there. So I tried to delete/drop the object and it won't go! any ideans on this?

Thanks

Richard

- also, I checked my function scripts and this function does make any reference to the table I am trying to remove. Peculiar?
Reply With Quote
  #2 (permalink)  
Old 01-21-04, 06:32
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: Drop table

Use control centre to view dependencies for the table and function ...

(BTW, does anyone have a standard SQL to list the dependencies on an object ?)

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 01-21-04, 06:43
Rdean Rdean is offline
Registered User
 
Join Date: Nov 2003
Posts: 17
Hi,

Thanks for the reply, I figured it out this morning and got it working and was about to update the thread but you beat me to it! Also turned out that person who had created the function had copied and pasted from an old one and left an invalid reference to the table I was trying to drop. Didn't affect the function but prevented me from dropping it! Grrr!

Thanks anyway,

Richard
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On