Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation returns null if one value is null 1

Status
Not open for further replies.

ChrisN

Programmer
Jul 9, 2001
59
GB
I have a query which pulls two quantity fields from different tables. If there is no related record in the second table then I cannot subtract one from the other cos the second value is null.

Basically what I want to know is, is it possible if no related records are returned to return a zero so that
A - B = A and the value I require is returned.

TIA,
Chris
 
Thanks Terry,

That worked fine. I had tried ISNULL but was missing the ',0' bit of it.

Cheers,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top