Db2

 View Only
  • 1.  SQL0750N is incomplete to give clues

    Posted Thu April 08, 2021 09:45 AM

    Hi,

    The following testcase will fail with SQL0750N:

    create table jmbt1 (f1 int, f2 varchar(20));
    create index ixjmbt1 on jmbt1 (upper(f2));
    rename table jmbt1 to jmbt1_old;
    SQL0750N  The statement failed because the table or column cannot be renamed. SQLSTATE=42986

    db2 ? SQL0750N will not mention the case "an index with expression exists on table". It took me some time to figure this out.

    Maybe adding a line to this SQL0750N message would be easy to fix in a coming fixpack ?

    Best regards, JMB


    #Db2
    #Db2EarlyAccessProgram(EAP)Forum


  • 2.  RE: SQL0750N is incomplete to give clues

    Posted Thu April 08, 2021 09:45 AM

    Thanks  @jmblaise .  I've passed this on to the development team.  Will let you know once I hear back.​




  • 3.  RE: SQL0750N is incomplete to give clues

    Posted Thu April 08, 2021 09:44 AM

    Hi JM,

     

    I was able to confirm that you are correct about the cause of the error and I will update the text for SQL0750N to include the index on expression scenario as well.

     

    Thanks for pointing this out!

     

    Paul