Sunday, April 27, 2014

Matrix output


;WITH cteChannel AS (
SELECT ID
FROM @T
WHERE Code = 'CHN'
), cteDrug AS (
SELECT ID
FROM @T
WHERE Code = 'DRG'
), cteTerm AS (
SELECT ID
FROM @T
WHERE Code = 'term'
)
SELECT *
FROM cteChannel, cteDrug, cteTerm

J.

No comments:

Post a Comment