Page 1 of 1

truncate table

Posted: Mon Jan 03, 2005 9:53 am
by bobby
hi,
i am truncated a staging table by using (truncate table aa )in before user defined sql , I was thinking to write this same function in datstage server
and call it from there in sequence , plz advice .
Thanks
Bobby

Posted: Mon Jan 03, 2005 11:50 am
by T42
You could use the Execute Command, to execute a command-line routine that will do whatever you want. Unfortunately, it is a hard-coded value (you can't pass paramters in this style.)

If you are using Oracle, it can be something like:

sqlplus (username/password login) 'truncate table blah blah'

Posted: Mon Jan 03, 2005 12:06 pm
by chulett
Or use the "Truncate table then insert rows" Update Action directly in your job.