SQL0440 error on delete statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 28days
    New Member
    • Aug 2008
    • 3

    SQL0440 error on delete statement

    HI,

    The following SQL statement returns an error SQL0440, complaining about routine '=' not found

    delete from XXX.YYYYY where YYYY_key = 99999

    > The database containing the table was restored from a Db2 V8 on one machine to V9 on a different machine (this happens on both Windows/)

    > Various SQL ALTER scripts where run tables around this table e.g ALTER adding foreignKey with this as the parent.

    When i subsequently Dropped/re-created a foreign Key against this table, it appeared to resolve the problem

    Question.
    1) has anyone seen this issue, would you have any idea what the source of the problem is


    Thanks and regards
  • spider007
    New Member
    • Jan 2007
    • 27

    #2
    Did you migrated the database before using it?

    Comment

    • 28days
      New Member
      • Aug 2008
      • 3

      #3
      Originally posted by spider007
      Did you migrated the database before using it?

      Thanks Spider007

      Not sure if the DB was migrated when moving to V9. I assume that when you say migrated, this is NOT the same as restoring a DB onto a later version of DB2??

      Comment

      • 28days
        New Member
        • Aug 2008
        • 3

        #4
        Originally posted by 28days
        Thanks Spider007

        Not sure if the DB was migrated when moving to V9. I assume that when you say migrated, this is NOT the same as restoring a DB onto a later version of DB2??

        Futher to this issue, i executed the following sql,
        ---------------------------------------------------------------------
        What this does
        1. Attempt delete from table (returns SQL0440)
        2. Drop Foreign Key (child of table in error)
        3. Attempt delete from table (works ok)

        delete from XXXXX.PERYYYYY where PERYYYYY_KEY = 99999999

        DB21034E The command was processed as an SQL statement because it was not a

        valid Command Line Processor command. During SQL processing it returned:

        SQL0440N No authorized routine named "=" of type "FUNCTION" having compatible

        arguments was found. SQLSTATE=42884



        commit

        DB20000I The SQL command completed successfully.



        ALTER TABLE XXXXX.ZZZZZZ DROP FOREIGN KEY ZZZZZZ_FK8

        DB20000I The SQL command completed successfully.



        commit

        DB20000I The SQL command completed successfully.



        delete from XXXXX.PERYYYYY where PERYYYYY_KEY = 99999999

        SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a

        query is an empty table. SQLSTATE=02000

        Comment

        Working...