ES-Components
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fantastic!!!! This code works perfectly. It is just what I needed
Thank you for your help.
RICK....
.
Thank you for your help.
RICK....
.
I'm glad you're happy! Thanks for the points.
Open in new window