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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return 0 for no record

Status
Not open for further replies.

mrliam69

Programmer
Jul 21, 2003
75
GB
I am trying to set up a calculation in a view against 2 tables.

Basically I have an embedded select statement + embedded select statement the problem is if either embedded select statement returns no rows then the calculation fails. Any ideas how I can get around this ?

(embedded select statement)
+
(embedded select statement)

Cheers

Liam
 
Cheers for the replies.

I had tried coalesce but it kept failing finally figured it out...

(select coalesce((embedded select statement),0))
+
(select coalesce((embedded select statement),0))

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top