Re: PL/SQL to truncate a table

From: <tjeumat_at_my-deja.com>
Date: Mon, 18 Dec 2000 10:22:27 GMT
Message-ID: <91koh0$bns$1_at_nnrp1.deja.com>


Hi,

It's unnecessary to use dbms_sql. Create a procedure in a package with the relevant coding. Grant execute privilege to user, who has to truncate the table.

Success,

Matthieu
In article <91gsub$46gtj$1_at_ID-62141.news.dfncis.de>,   "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
> It is
> Use dbms_sql (7.3, 8.0) or execute immediate (8i+) to address your
 need.
>
> Hth,
>
> Sybrand Bakker, Oracle DBA
>
> "James A. Williams" <willjamu_at_mindspring.com> wrote in message
> news:3a3b579d.1474103_at_news.mindspring.com...
> > I need to clear out a staging table weekly prior to an application
> > coming up. I know how to issue DML. Is truncate table considered
 DDL..
> >
> >
> > Logic:
> >
> > Insert into work select * from xxxx;
> >
> > if rc =0
> > then
> > do
> > truncate table
> > end
> > else
> > do
> > Say 'Insert did not work'
> > end
> >
> > exit
>
>

Sent via Deja.com
http://www.deja.com/ Received on Mon Dec 18 2000 - 11:22:27 CET

Original text of this message