Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Case and Null
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00969104
Message ID:
00969122
Views:
11
Hi Kirk,

The ISNULL() function would work in this case too. It's a shortcut for COALESCE() with only 2 parameters.

>
>Thanks again, that was what I needed, below is how I changed the code:
>
>
>case dbo.ChargeReportLog.ChargeType
>   when 'I'
>  then COALESCE((select coInv.primedesc from dbo.coinv where coinv.invid=dbo.ChargeReportLog.invID),
>    (select coCaseData.ManualDesc from dbo.CoCaseData where coCaseData.Meetingnumber=meetings.Meetingnumber and
>        coCaseData.CaseDataID=ChargeReportLog.CaseDataID))
>  else (select description from dbo.coProc where coProc.procID=dbo.ChargeReportLog.InvID)
>end as PrimeDesc,
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform