TRUNCATE TABLE does not work in PL/SQL - Why?
531621Feb 19 2007 — edited Feb 26 2007Hey there!
Is there any issue with truncate table not working inside an PL/SQL package?
For example this function:
PROCEDURE FLUSH_TABLE(vi_table_name VARCHAR2) IS
vn_table_name VARCHAR2(30);
BEGIN
vn_table_name := UPPER(LTRIM(RTRIM(vi_table_name)));
TRUNCATE TABLE vn_table_name;
END FLUSH_TABLE;
returns the following error msg:
Error: PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
:= . ( @ % ;
The symbol ":= was inserted before "TABLE" to continue.
Line: 5926
Text: TRUNCATE TABLE VN_TABLE_NAME;
Can somebody explain me the problem here? In my point of view, the error msg is not quite right ;)
Regards,
Thomas