Page 1 of 1

Truncate(Delete All Records) table and insert records

Posted: Thu Oct 06, 2005 4:09 am
by Madhusv
Hi ..I need to truncate the records from a table and then insert records coming from a source table. To do this am using 2 separate oracle stages - one for "delete all rows" and another one for upsert(insert and dummy update). But the problem is the records are getting deleted and inserted parallely and ultimately only a few rows are getting inserted into the target table.

Have provided a constraint @inrownum=1(For Delete oracle Stage) in a transformer prior to the 2 oracle stages. Linkorder - first delete all records link and then insert link.

Can someone advise me on how to achieve truncate and insert .

Regards..Madhu

Posted: Thu Oct 06, 2005 4:44 am
by hexa
Use Dynamic RDBMS Database

hexa

Posted: Thu Oct 06, 2005 4:47 am
by cmmurari
If you use Oracle enterprise Stage. you can choose in Target folder properties>> write method =Load and write mode=Truncate

Posted: Thu Oct 06, 2005 5:07 am
by Madhusv
THANKS FOR THE REPLIES:-

But the problem is we want the reject link for the insertion.


Oracle Enterprise (Load/Truncate) and Dynamic RDBMS Will not provide the reject link.

How do I achieve truncate - insert and still have the reject link for the insert operation.

Posted: Fri Oct 07, 2005 1:13 pm
by track_star
You mean you want to be able to reject any records that fail the INSERT?

Posted: Fri Oct 07, 2005 2:20 pm
by kcbland
Any adversity to simply executing a unix command call to sqlplus running a script with the statement "TRUNCATE TABLE drop storage;"?