>>>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(RQ.RQ_MOSJOB) > 0
>> THEN 'Work Order'
>> WHEN LEN(RQ.RQ_MOCNUMBER) > 0
>> THEN 'Customer Order'
>> ELSE 'Other'
>>END
>>
>
>I would use LTRIM in case of leading spaces.
:-)
I'm so focused on my style that I do not expect to have leading spaces :-))))
(That is wrong of course)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.