Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DML in Procedure
"Marc Eggenberger" <nw1_at_devnull.ch> wrote in message
news:MPG.19945a2e8931430989691_at_news.cis.dfn.de...
> Hi there.
>
> I made a procedure for an import I have to do. As a requirement I have
> to create a backup of this table. So I inserted an drop table, create
> table at the beginning. But this doesnt seem to work. The procedure does
> not compile.
>
> Are such statements (DML) not valid in procedures?
Not as such. You can however use EXECUTE IMMEDIATE to run your drop and create statements.
That said I wouldn't do it that way. I'd create the backup table first (with no rows) and then just delete from the backup table and insert into it in the SP
-- Niall Litchfield Oracle DBA Audit Commission UKReceived on Fri Aug 01 2003 - 05:51:32 CDT
![]() |
![]() |