1 Reply Latest reply on Sep 29, 2016 4:23 PM by Vadim Tropashko-Oracle

    [4.2EA] formatter error (INSERT ... LOG ERRORS)

    B.Delmée
      CREATE TABLE err_test ( ID INTEGER NOT NULL, VAL VARCHAR2(64));
      
      EXEC dbms_errlog.create_error_log('ERR_TEST','ERR_TEST_ER');
      
      INSERT INTO err_test (ID, val)
      SELECT 1, 'one' FROM dual
      LOG ERRORS INTO err_test_er(to_char(sysdate,'YYYY-MM-DD HH24:MI:SS')) REJECT LIMIT UNLIMITED;
      

       

      formatting the insert statement results in

       

      INSERT INTO err_test (ID, val)
      SELECT 1, 'one' FROM dual
      LOG ERRORS INTO err_test_er(to_char
      /*** Syntax Error at line 2, column 36
      
      
      LOG ERRORS INTO err_test_er(to_char(sysdate,'YYYY-MM-DD HH24:MI:SS')) REJECT LIMIT UNLIMITED;
                                          ^^^                                                       
      
      Expected: '(',
       ***/(sysdate,'YYYY-MM-DD HH24:MI:SS')) REJECT LIMIT UNLIMITED;