Thanks, I'd never even heard of the function. Took me a while to figure out why I was getting "Invalid length parameter passed to the LEFT or SUBSTRING function" but all sorted now.