ODBC Stage

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
Magesh_bala
Participant
Posts: 86
Joined: Mon Nov 27, 2006 3:42 am
Location: Wilmington

ODBC Stage

Post 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...
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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'.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post 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"
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply