Insert after target write

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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Insert after target write

Post by snassimr »

Hi !

If anybody can help me.

I have ODBC stage for writing of target table
After the rows written I want to insert one more row with specific values.

How can I to do it in one job ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Simplest will be to perform an 'after job' sql to insert row. If you want to keep everything in DataStage, you can include that as a separate link in your job.

As you said that it must be 'after' the rows are inserted, I believe it will have to do something with row count, reject info etc.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

Ok . I need one more link to odbc stage of target table . But where I can to write my insert statements ???
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

In the connected ODBC stage.....obviously.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

I can do it only choosin UPdate action is "User defined SQL" in inputs tab ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What exact action you wish to perform?
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

I have ODBC stage that writes target table
with update option "clear table and insert rows" and i want to use this option

I want immideatly after / or before run insert SQL that insert one my row with specific values to this target table

If I choose user - defined SQL in UPdate option I need to
write all SQL handly .
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Best is to have this as a stand-alone job.
ranga1970
Participant
Posts: 141
Joined: Thu Nov 04, 2004 3:29 pm
Location: Hyderabad

Post by ranga1970 »

after job subroutene can be of help
RRCHINTALA
Post Reply