Hi,
I have two records source with same keys but the only difference is the Date field. And i need to pick the record which has a max date and ignore the other record.
Please advice me.
Thanks In Advance
Selecting max Date Record
Moderators: chulett, rschirm, roy
What datatype and format is your date column? If it is a string in the form of yyyy-mm-dd then a simple string comparison will suffice.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 209
- Joined: Fri Jan 09, 2004 1:14 pm
- Location: Toronto, Canada
- Contact:
Re: Selecting max Date Record
Assuming that the source is a flat file, run the data through an aggregator, grouping by all the fields except the date field then select the max date. Only one row will survive the aggregation.
If the source is an RDBMS, you could do something similar using a group by in the SQL.
HTH,
Rob W
If the source is an RDBMS, you could do something similar using a group by in the SQL.
HTH,
Rob W
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Toronto, Canada
bartonbishop.com