Charles Baldo
asked on
Subquery needs 0 instead of null
I have the following sql with a subquery. If the subquery does not return a record I need it to return a 0. Tried to figure out something with isnull()
SELECT
ClientId,
(SELECT SUM(ClientDebtXref.Balance ) FROM ClientDebtXref WHERE ClientDebtXref.ClientAppli cationID = @ClientID AND DebtTypeID=7 ) HomeEquityBalance,
CurrentMonthlyOutstandingM ortagageBa lance ,
AssetLienBalance
from Assets
SELECT
ClientId,
(SELECT SUM(ClientDebtXref.Balance
CurrentMonthlyOutstandingM
AssetLienBalance
from Assets
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER