Search one column return value from another
I have three columns, start date, end date and event ID. The event ID
repeats, so the start and end date look like this:
eventid start_date end_date
100 1/1/07 1/1/07(i know it looks odd but this is the way it is)
100 1/2/07 1/2/07
100 1/3/07 1/3/07
What I want to do is search the number of eventid's and return the last end
date in the event id's. Where from the above output I could get:
start_date = 1/1/07
end_date = 1/3/07
I have looked at the LOOKUP command and tried an IF statement but that
doesnt seem to work. I think I need to compare values but not sure how, so
as long as eventid = 100 nothing is returned but once no longer = 100, the
last date is returned.
Let me know if I can provide clarification.
TIA
|