Hello
Thank you very much for your response. I really appreciate it
I have tried the code I and I am getting a syntex error, and cannot see why
Also whilst you are still there, If I were to add another sub query would I put a comma in the following place:
SELECT a.clrec_identity
, , ( SELECT MAX(clmov_movedate)
FROM clinrec_movements
WHERE clmov_movedate < a.clmov_movedate
AND clrec_identity = 100027 ) pen_date
, ( SELECT.........................................) MAXOf
Thanks in advance for any further advice