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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Help with a truncate command in a procedure

RE: Help with a truncate command in a procedure

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Thu, 06 Feb 2003 15:48:58 -0800
Message-ID: <F001.00546926.20030206154858@fatcity.com>


(pant pant)

Will I be the first to say that you need to use dynamic SQL? dbms_sql package in Oracle version < 8.1 execute immediate in Oracle version >= 8.1

-----Original Message-----

I am not a coder but I received this from one of our developers. I can't find anything about this anywhere. Can someone tell me how to make the truncate work?
Thanks!
R.Smith
In a DB procedure, I wanted to include the following SQL: BEGIN
 TRUNCATE TABLE LOT837_GLOBAL_TBL_KMG;
END;
Error messages:
PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
  := . ( @ % ;
The symbol ":= was inserted before "TABLE" to continue.
(It does not like it, if you take out TABLE, either.)
So, I had to settle for the following SQL: BEGIN
 DELETE LOT837_GLOBAL_TBL_KMG;
END;
Do you know why I can not use the TRUNCATE command?

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jacques Kilchoer
  INET: Jacques.Kilchoer_at_quest.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Thu Feb 06 2003 - 17:48:58 CST

Original text of this message

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