Re: pl/sql
Date: Fri, 18 May 2001 10:31:50 +0200
Message-ID: <9e2mnf$on51_at_gamma.st.com>
Jason,
This may help you...... ;-)
Ciao, Yannick.
DECLARE
curseur INTEGER;
result INTEGER;
command VARCHAR2(2000);
BEGIN
curseur:=DBMS_SQL.OPEN_CURSOR;
command:='delete from tableA where ID not in (select ID from tableB)';
DBMS_SQL.PARSE(curseur,command,DBMS_SQL.V7);
result:=DBMS_SQL.EXECUTE(curseur);
--Value of result could be tested of course.....
DBMS_SQL.CLOSE_CURSOR(curseur);
END;
/
"Jason John" <jason_jb_at_utas.edu.au> wrote in message
news:990145812.701684_at_atlas.corp.au.home.com...
> Can anyone help me convert the following SQL into PL/SQL ...
>
> delete from tableA where ID not in (select ID from tableB);
>
> ... so that the stuff in brackets () is decided only once (i.e.: we don't
do
> a select for every row in tableA).
>
>
> thanks :)
> Jason
>
>
>
Received on Fri May 18 2001 - 10:31:50 CEST