Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CASE WHEN based on select
Message
From
13/04/2015 12:02:19
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01618310
Message ID:
01618315
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform