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: <STolochkov_at_kkb.kz>
Date: 2000/04/21
Message-ID: <8dp6ci$rgc$1@mail.nursat.net>#1/1

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