Is it possible to put a CASE statment into a view sub-SELECT?
CREATE VIEW myview
AS
SELECT item1, item2, (SELECT TF = CASE item3 WHEN 1 THEN 'T' ELSE NULL) as TF
FROM TABLE1
If so, I am not sure as to the exact syntax. I thought I saw an example of it in BOL, but exstensive serching has not found it. When I try in SEM, I get an error saying that CASE is not allowed in a view. I have other views that get a similar error, but the view works anyway. It seems the problem is with the view designer in that case.
Any/All help is appriciated.
Thank You
Rollin Burr
Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.