Saturday, 31 August 2013

Replacing null with zero

Replacing null with zero

Hi I have following select command in SQL Server. I am trying to change it
so if b.bId is null i want to assign it 0 value. So it displays 0 in the
field.
select top 1
a.sId
,b.bId
from tlocal a
left outer join t_ssr_buyer_reporting_period b on (b.id=a.mainId)
where
a.id=@xId;
Please let me know how to modify. Thanks

No comments:

Post a Comment