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 -> Re: Updates with sequences : not allowed ?

Re: Updates with sequences : not allowed ?

From: Joel SEGUILLON <Joel.Seguillon_at_uhb.fr>
Date: 2000/04/21
Message-ID: <39002DDD.83E0E66E@uhb.fr>#1/1

    Thanks,
  But i don't know much about dynamic SQL. Could someone give me an example or, best, the function i need ;) Bye

STolochkov_at_kkb.kz wrote:
>
> Hi!
> >
> > 1 create or replace function get_s
> > 2 (seq_name IN VARCHAR2(30))
> > 3 return number
> > 4 as
> > 5 l_s number;
> > 6 begin
> > 7 select seq_name.currval into l_s from dual;

 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> > 8 return l_s
> > 9* end;
> >
> > But it does not work... and compiles with errors :(. Anyone has got a
> > better idea ?
> You cannot use variable as seq_name. Use dynamic SQL.
>
> WBR Sergey
Received on Fri Apr 21 2000 - 00:00:00 CDT

Original text of this message

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