Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
DECLARE @cols NVARCHAR(2000), @query NVARCHAR(4000) SELECT @cols = COALESCE(@cols + ',' + QUOTENAME(Car_Name), QUOTENAME(Car_Name)) FROM lookup_cars ORDER BY Car_Name, OrderSeq SET @query = 'SELECT * FROM ( view_new_cars )t PIVOT (COUNT(t.CarID) FOR T.Car_Name IN (' + @cols + ')) as PVT' EXEC(@query)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.