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: Truncate Table Not Allowed in PL/SQL?

Re: Truncate Table Not Allowed in PL/SQL?

From: sganesh <sganesh_at_apple.com>
Date: 12 May 1999 01:45:47 -0500
Message-ID: <3739158b@discussions>

No way!! You cannot directly execute a ddl from any stored proc. You can use wither dbms_sql package to fire dynamic sqls to do this or try using execute_ddl() Sanjay

Hi <hichan_at_my-dejanews.com> wrote:
>A one-line stored procedure:>
>CREATE OR REPLACE PROCEDURE x1 as
>begin
>truncate table tablex1;
>end;
>
>got this error, 'PLS-00103: Encountered the symbol "TABLE" when
>expecting one of the following: := . ( @ % ;The symbol ":= was
>inserted before "TABLE" to continue.'
>
>While connected as the same user, I have no problem to execute this
>truncate command in SQL worksheet.
>
>
>Hi Chan
>
>
>--== Sent via Deja.com http://www.deja.com/ ==--
>---Share what you know. Learn what you don't.---
Received on Wed May 12 1999 - 01:45:47 CDT

Original text of this message

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