truncate table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bobby
Participant
Posts: 86
Joined: Mon Jul 19, 2004 8:31 pm

truncate table

Post 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
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post 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'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or use the "Truncate table then insert rows" Update Action directly in your job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply