hi, many thanks for replying so promptly. Maybe if I can put it like this you will be able to see more clearly
Unfortunately my SQL knowledge stops after select * from ......
If you could be so kind as to reformat this into sql2008 code it would be greatly appreciated.
SELECT M.client_no,
M.matter_no,
M.matter_description as description,
W.work_description,
F.fee_earner_description as solicitor,
CAST(COALESCE(COUNT(P.matter_no),0) AS varchar(4))+' New' as Messages,
E.fee_email_address as email
FROM matters AS M, fecodes as F, worktype as W, pubmessage as P, feemail as E
WHERE m.work_type = W.work_id
AND M.fee_earner = F.fee_earner_code
AND F.fee_earner_code *= E.fee_earner_code
AND M.client_no *= P.client_no
AND M.matter_no *= P.matter_no
AND M.client_no = @clientNo
AND M.Web_enabled = 1
AND P.msg_status <> 'SENT'
I have a problem putting this complicated code above into the format that u suggested :S
I appreciate that this is free help - and I really do appreciate any time on this to help me.
Thank you again