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
somu_june
Premium Member
Posts: 439 Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road
Post
by somu_june » Wed Jun 04, 2008 2:55 pm
Hi,
Iam getting three date fields X,Y and Z and there data types is varchar(10) . I want to find the maximum date from X,Y and Z and send to the output. Do I need to convert string to Date and then find Maximum of XYZ or can I do it with out converting . The final output data type to which I should map maximum date is Varchar (10)
Thanks,
Somaraju.
somaraju
relati
Participant
Posts: 17 Joined: Mon Oct 01, 2007 12:44 pm
Post
by relati » Wed Jun 04, 2008 3:14 pm
What is the date format in the Input fields?
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Jun 04, 2008 3:34 pm
You can do it without conversion if the date strings are in a sortable format, such as YYYY-MM-DD.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
somu_june
Premium Member
Posts: 439 Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road
Post
by somu_june » Wed Jun 04, 2008 3:34 pm
Hi,
It is Varchar(10)
Thanks,
Somaraju
somaraju
somu_june
Premium Member
Posts: 439 Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road
Post
by somu_june » Wed Jun 04, 2008 3:36 pm
somu_june wrote: Hi,
It is Varchar(10) and it has YYYYMMDD format
Thanks,
Somaraju
somaraju
relati
Participant
Posts: 17 Joined: Mon Oct 01, 2007 12:44 pm
Post
by relati » Wed Jun 04, 2008 3:54 pm
OK, then you can compare them without converting and pick the max.
somu_june
Premium Member
Posts: 439 Joined: Wed Sep 14, 2005 9:28 am
Location: 36p,reading road
Post
by somu_june » Thu Jun 05, 2008 7:03 am
Thanks folks
somaraju
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu Jun 05, 2008 2:31 pm
Please mark thread as Resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.