In which case you could do this:DECLARE @tbl TABLE ( [cola] INT , [colb] VARCHAR(10) , [colc] VARCHAR(10) )INSERT @tbl SELECT 1, 'a', 'aa'UNION SELECT 4, 'b', 'bb'UNION SELECT 2, 'c', NULLUNION SELECT 5, 'd', 'dd'UNION SELECT 3, 'e', 'ee'DECLARE @string VARCHAR(8000)SET @string = ''SELECT @string = @string + [colb] + ':' + [colc] + ';'FROM @tblWHERE [colc] IS NOT NULLORDER BY [cola]IF LEN(ISNULL(@string, '')) <> 0 SELECT @string = LEFT(@string, LEN(@string) - 1)SELECT @string
Why do you want to do this? I can't think of a reason.-------------Charlie