truncate is a sqlplus command(and DDL), so to do it, you need to use the dbms_sql(or execute immediate) command, i think.

joe


Smith, Ron L. wrote:

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?

If you are not the intended recipient of this e-mail message, any use, distribution or copying of the message is prohibited. Please let me know immediately by return e-mail if you have received this message by mistake, then delete the e-mail message. Thank you.

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Joe Testa
 INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to