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?
- also, I checked my function scripts and this function does make any reference to the table I am trying to remove. Peculiar?
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!