Nuacht

DECLARE @total_col VARCHAR(MAX) DECLARE @result NVARCHAR(MAX) SET @total_col='' SELECT @total_col = @total_col + QUOTENAME(item) + ',' FROM items SET @result=LEFT(@total_col, (LEN(@total_col)-1)) ...
Creates a small database table called dog and populates with hql. Creates 2 lookup tables breedLookup and colorLookup and 4N dog. Joins breedLookup and colorLookup to form a new table dogextended.