Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Create This CASE Statement
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01444588
Message ID:
01444598
Views:
32
>>How do you convert this to a CASE in SQL?
>>
>>
>>IIf(Trim(RQ.RQ_MOSJOB)<>"","Work Order",IIf(Trim(RQ.RQ_MOCNUMBER)<>"","Customer Order","Other")) AS [Reqt Type], 
>>
>>
>>Thanks
>
>case when len(Ltrim(RQ.RQ_MOSJOB)) > 0 
>                   then "Work Order" 
>                   else 
>                        case when len(lTrim(RQ.RQ_MOCNUMBER)) > 0 
>                                    then "Customer Order" 
>                                    else "Other" END
>                END as [Reqt Type]
That's it! Thanks!
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Reply
Map
View

Click here to load this message in the networking platform