1 Reply Latest reply: Nov 19, 2010 6:00 AM by hm RSS

    compiling int 10g not compiling in 11g

    597312
      Hi
      I have proc and its compiled in 10g but its not compiling in 11g

      In proc content is:

      INTO TABLE_NAME
      VALUES (SYSDATE, ‘SAMPLE’,
      1234, 'C',
      ROWNUM)

      Error is:
      ORA-00976: Specified pseudocolumn or operator not allowed here

      Thanks anyone helped.
        • 1. Re: compiling int 10g not compiling in 11g
          hm
          Rownum is only defined in a select context. Here you don't select data.

          This should work:
          insert into table_name
          select SYSDATE, 'SAMPLE', 1234, 'C',ROWNUM from dual;
          but it does not make much sense, because rownum will always be 1.

          By the way: It would be better to specify the columns for insert statement. Something like this:
          insert into table_name (yourcol1, yourcol2, yourcol3, yourcol4, yourcol5)
          select SYSDATE, 'SAMPLE', 1234, 'C',ROWNUM from dual;
          Edited by: hm on 19.11.2010 03:59