Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Create This CASE Statement
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01444588
Message ID:
01444598
Vues:
30
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform