Page 1 of 1
Deleting rows from an SQL table
Posted: Mon Feb 19, 2007 10:27 am
by gpbarsky
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.
Posted: Mon Feb 19, 2007 10:30 am
by chulett
Read the file and send the keys to your database stage of choice using the 'Delete existing rows' update action. Easy Peasy.
Posted: Mon Feb 19, 2007 10:33 am
by narasimha
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.
Posted: Mon Feb 19, 2007 11:39 am
by gpbarsky
Thanks, but I have not the option for deleting rows. I'm using the ODBC stage.
Posted: Mon Feb 19, 2007 11:45 am
by chulett
Then either switch to the DRS stage, which does have that option for ODBC, or use user-defined sql.
Posted: Mon Feb 19, 2007 7:57 pm
by kduke
chulett wrote:Easy Peasy.
Been watching "The Greatest Game Ever"?
Posted: Mon Feb 19, 2007 10:16 pm
by chulett
Lemon squeezie.
Posted: Mon Feb 19, 2007 10:33 pm
by kduke
Me too.