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
gpbarsky
Participant
Posts: 160 Joined: Tue May 06, 2003 8:20 pm
Location: Argentina
Post
by gpbarsky » Mon Feb 19, 2007 10:27 am
Hi, my friends... :D
Given a file which is composed by keys of a table, I need to delete the rows of the table corresponding to the keys of the file. I mean, for each record of the file, I need to delete the rows of the table.
How can I do this ?
Thanks in advance.
Guillermo P. Barsky
Buenos Aires - Argentina
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Feb 19, 2007 10:30 am
Read the file and send the keys to your database stage of choice using the 'Delete existing rows' update action. Easy Peasy.
-craig
"You can never have too many knives" -- Logan Nine Fingers
narasimha
Charter Member
Posts: 1236 Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY
Post
by narasimha » Mon Feb 19, 2007 10:33 am
You could design your job like below
Code: Select all
Sequential File Stage -------> Transformer -------> DRS Stage
You can specify "Delete existing rows only" in the target stage.
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
gpbarsky
Participant
Posts: 160 Joined: Tue May 06, 2003 8:20 pm
Location: Argentina
Post
by gpbarsky » Mon Feb 19, 2007 11:39 am
Thanks, but I have not the option for deleting rows. I'm using the ODBC stage.
Guillermo P. Barsky
Buenos Aires - Argentina
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Feb 19, 2007 11:45 am
Then either switch to the DRS stage, which does have that option for ODBC, or use user-defined sql.
-craig
"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Posts: 5227 Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:
Post
by kduke » Mon Feb 19, 2007 7:57 pm
chulett wrote: Easy Peasy.
Been watching "The Greatest Game Ever"?
Mamu Kim
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Feb 19, 2007 10:16 pm
Lemon squeezie.
-craig
"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Posts: 5227 Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:
Post
by kduke » Mon Feb 19, 2007 10:33 pm
Me too.
Mamu Kim