CREATE TABLE #temp(name char(3)) INSERT INTO #temp VALUES ('CD') ,('AB') ,('LM') ,('BC') ,('GH') ,('KJ') ,('AB') DECLARE @cols AS NVARCHAR(MAX); SELECT @COLS = substring(list, 1, len(list) - 1) FROM (SELECT list = (SELECT DISTINCT name + ',' FROM #temp ORDER BY name + ',' FOR XML PATH(''), TYPE).value('.', 'nvarchar(MAX)')) AS T SELECT @COLS DROP TABLE #temp
Book Review: Big Red - Voyage of a Trident Submarine
I've grown up reading Tom Clancy and probably most of you have at least seen Red October, so this book caught my eye when browsing used books for a recent trip. It's a fairly human look at what's involved in sailing on a Trident missile submarine...
2009-03-10
1,439 reads