Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CASE WHEN based on select
Message
De
13/04/2015 12:02:19
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01618310
Message ID:
01618315
Vues:
25
>In your case the condition
>
>What has to be adjusted is that if the select has Company.Activated=True, I need to obtain 2. If it is False, I need to obtain 3.
>
>is reversed.

Yes, I reversed it.

>Also, do you have just one row in the company for numero and want to check if it's activated or not? You can change EXISTS to be
>
>(select 1 from Company where Numero = Client.NoCompany and Activated = 0)

Yes, that is unique.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform