Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Copy inside EXECUTE IMMEDIATE
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 BortelReceived on Wed Jun 16 2004 - 13:41:27 CDT