On 4 Dec, 07:47, monesseldeur <raymondesseld...@gmail.com> wrote:
> Hi all,
>
> I'm trying to write a script in which I need the result of a query to
> perform an insert in a table.
>
> Something like this:
>
> var = select max(Xid) from tbl_X;
> var = var + 1;
> insert into tbl_X (Xid) values (var);
>
> Is this possible without uising Pl/SQL?
Have you considered a database sequence?
http://download.oracle.com/docs/cd/B....htm#sthref883
HTH
-g