From: jpBless on
SQL Server 2008

I have a calculated field like

(Car.CarTot + Car.CarTax + Car.CarOther) - (Order.SubTot + Order.Taxes +
Order.Other)

My problem is this field sometimes returns Null When Values in "Order" is
null. I would like to have 0 instead of Null

Thanks for your help


From: --CELKO-- on
>> I would like to have 0 instead of Null<<


COALESCE (<column name>, 0.00)
From: jpBless on
Works!!

Thanks

"--CELKO--" <jcelko212(a)earthlink.net> wrote in message
news:ab609b46-3461-4ff1-8b42-3a079c8ed718(a)z11g2000yqz.googlegroups.com...
>>> I would like to have 0 instead of Null<<
>
>
> COALESCE (<column name>, 0.00)


From: iNewbie on
try isnull(Order,0)



"jpBless" wrote:

> SQL Server 2008
>
> I have a calculated field like
>
> (Car.CarTot + Car.CarTax + Car.CarOther) - (Order.SubTot + Order.Taxes +
> Order.Other)
>
> My problem is this field sometimes returns Null When Values in "Order" is
> null. I would like to have 0 instead of Null
>
> Thanks for your help
>
>
> .
>
From: David Kaye on
"jpBless" <jp3blessNoSpam(a)hotmail.com> wrote:

>My problem is this field sometimes returns Null When Values in "Order" is
>null. I would like to have 0 instead of Null

Create the Order field with a default value of 0.