• Thanks Gail.

    I've written the REPLACE to get rid of the x0D's and that bit's worked.

    You were right about the UNFIN, it was picking up a previous field that I hadn't filtered out in the sub-select query.

    Thanks for all your help.