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

Home -> Community -> Usenet -> c.d.o.server -> Re: Copy inside EXECUTE IMMEDIATE

Re: Copy inside EXECUTE IMMEDIATE

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Wed, 16 Jun 2004 20:41:27 +0200
Message-ID: <caq3vu$ib2$1@news1.tilbu1.nb.home.nl>


Roy wrote:

> DECLARE
> sql_txt VARCHAR2(200);
> BEGIN
> sql_txt:= 'COPY FROM AA/AA_at_AA TO BB/BB_at_BB REPLACE T1 USING SELECT *
> FROM T1;';
> EXECUTE IMMEDIATE sql_txt;
> END;
> /
>
> ORA-00900: invalid SQL statement
> ORA-06512: at line 5
>
> When I use the copy command without EXECUTE IMMEDIATE it works fine,
> but with EXECUTE IMMEDIATE I get the errors.
> What is wrong and how can I fix it?

Drop the ";" - it does not belong in an execute immediate statement

-- 

Regards,
Frank van Bortel
Received on Wed Jun 16 2004 - 13:41:27 CDT

Original text of this message

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