Hello I have the following table data(posed in the CODE sec.
wondering how to get the row data with the min date from each OPID. If the 2nd Window date is less than 1st Window date then the 2nd Window should be read.
get the min date goes something like...
Select distinct min DATE, OPID, Window
But the problem is if the 2nd window is the lesser date of the windows.
Accnt OPID DATE Window
34 1 9/22/11 12:32 PM 1st WINDOW
34 1 9/22/11 12:33 PM 2nd WINDOW
12 2 9/21/11 11:02 AM 1st WINDOW
12 2 9/21/11 11:01 AM 2nd Window
455 1 9/22/11 1:09pm 1st WINDOW