From: jpBless on 12 Apr 2010 13:59 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 12 Apr 2010 15:23 >> I would like to have 0 instead of Null<< COALESCE (<column name>, 0.00)
From: jpBless on 12 Apr 2010 16:04 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 12 Apr 2010 16:09 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 12 Apr 2010 20:31
"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. |