- Denormalizing a list
- Dynamic Cross tabs query
In following example we will see how can we denormalize a list i.e. converting a vertical list into horizontal list.
use NorthWind;
DECLARE @Name nvarchar (2200)
SET @Name = ''
SELECT @Name = @Name + A.Name + '; ' FROM (Select DISTINCT CompanyName AS Name FROM Customers) AS A
PRINT @Name
No comments:
Post a Comment