If an SQL statement returns no data how can I enter a value in a field?

Select Sum(ext-price) From ordertable
WHERE shipdate=date()

 As long as the shipdate is equal to the current day the above select statement will Sum the ext-price field. That is okay. How do I fix the select statement to enter 00.00 in the ext-price field if there is no order for the current day?
This is being displayed on my webpage that uses Dreamweaver.

Obviously if the condition is not met there is no data to sum. So how do I fill in this field with zeros?

Any help would be appreciated
Thank you
Rick
ES-ComponentsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ArgentiCommented:
Select IIF(SUM(ext-price) is NULL, 0, SUM(ext-price)) 
From OrderTable
Where shipdate=date()

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ArgentiCommented:
Or if you want to have the value formatted

SELECT FormatNumber(Str(IIf(Sum(ext-price) is Null, 0, Sum(ext-price))), 2) 
FROM OrderTable
WHERE shipdate=date()

Open in new window

0
ES-ComponentsAuthor Commented:
Fantastic!!!! This code works perfectly. It is just what I needed
 Thank you for your help.
RICK....
.
0
ArgentiCommented:
I'm glad you're happy! Thanks for the points.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.