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.---
Hth,
Sybrand Bakker, Oracle DBA
Hi wrote in message <7ha3gm$itb$1...@nnrp1.deja.com>...
num_rows:= dbms_sql.execute (cur_handle);
-- num_rows needs to be declared as a number
> dbms_sql.close_cursor(cur_handle);
> end;
>
> Hth,
> Sybrand Bakker, Oracle DBA
>
> Hi wrote in message <7ha3gm$itb$1...@nnrp1.deja.com>...
> >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.---
>
>
--
Alex Shterenberg
"I hate people. I think they should suffer as much as
possible, and therefore I'm into those old communist
dictatorships." - Euronymous, Mayhem
so a short solution is:
dbms_utility.exec_ddl_statement(
'truncate table ' || i_table_name
);
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
AleX wrote in message <7hfkij$10l$1...@nnrp1.deja.com>...
Scott Hutchinson
SHu...@Globalnet.co.uk
Big Bear wrote:
> yeah same here. they say you can't use DDL in store proc. see replies
> to my post dt 10th may
>
> Hi wrote:
>