Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Updates with sequences : not allowed ?

Updates with sequences : not allowed ?

From: Joel SEGUILLON <Joel.Seguillon_at_uhb.fr>
Date: 2000/04/20
Message-ID: <38FF2983.7A53C851@uhb.fr>#1/1

    Hi,
  I am still fighting with my SQL scripts and i have a new problem. I'm just trying to do something like :

     Update table1 
     set field1 = 'myvalue'
     where field2 = table2_sequence.CURRVAL;
  But SQLplus answers me : ORA-02287 : sequence number not allowed here.   I tryed to use something like :
    ... where field2 = (select last_number from user_sequences where sequence_name = 'table2');
  But it does not work : currval and last_number do not seem to be the same (i had currval = 30 and last_number = 41 :) ).

  If anyone has got an idea...
Thanks. Received on Thu Apr 20 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US