Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Case and Null
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00969104
Message ID:
00969122
Vues:
12
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform