views:

46

answers:

1

Hi,

SELECT @s = ISNULL(@s + '. ' , '') + [Comments]
FROM [Customer]

RETURN @s   

How can I catch Null or '', so that if its either It Won't append to the string and not add a '.'

Thanks

Jacob

+7  A: 
SELECT
    @s = ISNULL(NULLIF(@s, '') + '.', '') + comments
FROM
    [Customers]

RETURN @s
Tom H.