Hi there, I have a group of records like this;
NAME| RUN START| RUN END| LK1| LK2| DESC
Graeme Brown| 2012-02-23 07:20:00.0000000| 2012-02-23 07:50:00.0000000| 2213| 2244| AK1/4/PI2
Graeme Brown| 2012-02-23 08:00:00.0000000| 2012-02-23 09:25:00.0000000| 2244| 2052| AK1/4/PI2
Graeme Brown| 2012-02-23 09:30:00.0000000| 2012-02-23 11:05:00.0000000| 2052| 917| AK1/4/PI2
Graeme Brown| 2012-02-23 12:15:00.0000000| 2012-02-23 13:55:00.0000000| 917| 2052| AK1/4/PI2
Graeme Brown| 2012-02-23 14:05:00.0000000| 2012-02-23 15:40:00.0000000| 2052| 1111| AK1/4/PI2
I want to get;
NAME| RUN START| RUN END| LK1| LK2| DESC
Graeme Brown| 2012-02-23 07:20:00.0000000| 2012-02-23 15:40:00.0000000| 2213| 1111| AK1/4/PI2
So what it needs to do is combine the ;
earliest RUN START and corresponding LK1 with
latest RUN END and corresponding LK2
Can anyone please help? I've tried creating temp tables with the mins and maxs - but then I can't combine them with the LK1 and Lk2 fields...
I'm a bit lost...
Thank you in advance!