RE: Help with a truncate command in a procedure

2003-02-07 Thread Bernard, Gilbert
gine- De: Smith, Ron L. [mailto:[EMAIL PROTECTED]] Date: vendredi 7 février 2003 15:09 À: Multiple recipients of list ORACLE-L Objet: RE: Help with a truncate command in a procedure Thanks for the help! Ron -Original Message- Sent: Thursday, February 06, 2003 5:49 PM To: Multiple recipi

RE: Help with a truncate command in a procedure

2003-02-07 Thread Smith, Ron L.
Title: Message Thanks for the help!   Ron -Original Message-From: Jacques Kilchoer [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 5:49 PMTo: Multiple recipients of list ORACLE-LSubject: RE: Help with a truncate command in a procedure (pant pant) Will I

Re: Help with a truncate command in a procedure

2003-02-06 Thread Mark Richard
Ron, Trunacte is DDL not DML. The easiest was around this is to wrap it in an execute immediate command: BEGIN EXECUTE IMMEDIATE 'TRUNCATE TABLE LOT837_GLOBAL_TBL_KMG'; END; / Note that the semi-colon is outside the quotes - don't place a semi-colon inside the quotes. Regards, Mark.

Re: Help with a truncate command in a procedure

2003-02-06 Thread Joe Testa
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

RE: Help with a truncate command in a procedure

2003-02-06 Thread Stephen Lee
Look up info on using "execute immediate" This will let you put non-DML-type statements in a PL/SQL block. -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? T

RE: Help with a truncate command in a procedure

2003-02-06 Thread Jacques Kilchoer
Title: RE: Help with a truncate command in a procedure (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- From: Smith, Ron L. [mailto:[EMAIL PROTECTED

RE: Help with a truncate command in a procedure

2003-02-06 Thread Richard Ji
Title: Help with a truncate command in a procedure Truncate is a DDL.  So you can't just do "truncate" like you would with delete which is a DML. You didn't say which version of Oracle you are running.  If it's 8i, do   execute immediate "truncate table .";   Otherwise, look into DBM