Selecting Max(date) column with multiple rows

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

PhilHibbs wrote:
priyadarshikunal wrote:It can be found in sub property of 'Column for calculation'.
Nope, no "Preserve type" attribute...
Doesn't seem to be there, i think its 7.x screenshot. In which it might be buried somewhere or even not be there.
Last edited by priyadarshikunal on Wed Aug 11, 2010 10:29 am, edited 1 time in total.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

definately, its there in version 8.x, not quite sure about 7.x but if its not there (i think its not), one workaround can be converting it to julian date, before aggregator(or decimal as yyyymmdd/yyyymmddhh24miss ) to get the max and convert it back.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do you need an Aggregator? Why not just Sort the Data based on Code and Date and use Remove Duplicate to retain First. (Or last, based on sorting order)
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

kumar_s wrote:Do you need an Aggregator? Why not just Sort the Data based on Code and Date and use Remove Duplicate to retain First. (Or last, based on sorting order)
I'm already aggregating the data on the key, then I found I needed the max date, so I just slipped it in.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

priyadarshikunal wrote:definately, its there in version 8.x, not quite sure about 7.x but if its not there (i think its not), one workaround can be converting it to julian date, before aggregator(or decimal as yyyymmdd/yyyymmddhh24miss ) to get the max and convert it back.
It's there. Somewhere.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply