Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Truncate command in Procedures

Truncate command in Procedures

From: bwest <bwest_at_sdsc.edu>
Date: Fri, 20 Aug 1999 14:36:20 -0700
Message-ID: <37BDCA54.7A3D2A66@sdsc.edu>



I am attempting to create a procedure containing SQL truncate statements

as in the following:

create procedure prep_database_sp
as
BEGIN

truncate table ol_summary;
truncate table employee_appointment;
truncate table labor_distribution;
delete from employee;
delete from active_index;
delete from index_fund_xref;

END;

This fails to compile with the truncate statement although the Oracle
Handbook cites no restriction on the type of SQL statements that can be
put in the body of a procedure.

I get the following error message:

PLS-00103 Encountered the symbol "TABLE" when expecting the one of the
following: := . ( @ % ;

Is there anyway to use truncate or is this an 'undocumented feature'?
  Received on Fri Aug 20 1999 - 16:36:20 CDT

Original text of this message

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