Page 1 of 1

ODBC Stage

Posted: Wed Feb 14, 2007 7:17 am
by Magesh_bala
Hi,
In my ODBC Stage i have selected user defined queries, I want to write a two queries in Enter SQL box. How do i separate two quries, Whether its possible???

First i have to delete records from the table and i have to insert into the same table, Please clearify...

Posted: Wed Feb 14, 2007 8:04 am
by DSguru2B
You can use DRS stage and write a the delete statement in the before sql tab.
When you say "first delete and then insert", an option already exists for it. Is this a selective delete. Give more info on the delete 'where predicate'.

Posted: Wed Feb 14, 2007 10:49 am
by narasimha
Alternativly, you could also use ODBC stage, and depending on your requirement,
in the Update action you could use "Replace existing rows completely" or "Clear the table and then insert rows"

Posted: Wed Feb 14, 2007 2:30 pm
by ray.wurlod
The "replace existing rows completely" option deletes the row whose key is supplied from DataStage then inserts a new row with this key.