I apologize if this is a double post, but it didn't go through the first
time.....

There is a function in SQL called IsNull which replaces a NULL result with
whatever value you specify.

Try doing this in the first line of your statement:
SELECT IsNull(Count(OrderDate),0) AS TotalOrdersPerDay

That way if the result set is NULL it will output a 0.

Ali
-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 04, 2005 2:23 PM
To: CF-Talk
Subject: OT: SQL Case Question?

This code works great, for the most part. How would I change this code so
that if there were NO orders for a particular day, the query would return a
result of zero [0] and not null or whatever it returns when there is no
result? Does this make sense? I just don't want to have <td> cells with
nothing in them.

Thanks, Che



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197546
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to