update the target table with max date

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
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Did you trying using aggregator and doing max(date) in it?
nayanpatra
Participant
Posts: 41
Joined: Sat Jun 06, 2009 11:13 pm
Location: Kolkata

First sort then remove duplicate

Post by nayanpatra »

First you read the oracle table using ODBC stage. Next sort the records in ascending order using EMPLID, EMPL_RCD and EFFDT as key. Next use the remove duplicate RDUP stage using EMPLID and EMPL_RCD as the key and retain the last record. Thereby, you will have the record according to your requirement. Next do whatever update you want. I think this will work. Just check it out.
Nayan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: People, we're in the Server forum with the Job Type marked as Server so please stop handing out PX solutions. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In server jobs the Aggregator stage has First and Last as set functions per group.
Last edited by ray.wurlod on Tue Jul 07, 2009 12:08 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
seshikumar
Participant
Posts: 44
Joined: Fri Mar 16, 2007 5:51 am

Post by seshikumar »

thanks for your quick response.

i got solution.
seshu
datskosaraju
Premium Member
Premium Member
Posts: 48
Joined: Tue Nov 25, 2008 11:10 pm
Location: Des Moines,IA

Post by datskosaraju »

seshikumar wrote:thanks for your quick response.

i got solution.
Can you please post your solution
"It's easier to go down a hill than up it but the view is much better at the top"
-Bennet,Arnold
Post Reply