Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub-Select with CASE in a view??
Message
De
06/05/2004 07:06:48
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Sub-Select with CASE in a view??
Divers
Thread ID:
00901502
Message ID:
00901502
Vues:
54
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform