User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 427,234 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,222 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums
Views: 1001 | Replies: 1
Reply
Join Date: Feb 2008
Posts: 2
Reputation: federod is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
federod federod is offline Offline
Newbie Poster

Help Need help with NULL values

  #1  
Feb 7th, 2008
Hey guys I having a problem with the null values and I need help when I have a Null value or Empty value I need to make the price = 0. Because I will get this error

The value "" cannot be converted to a number

Here is the the code
<cfquery name="totalsovr" datasource="data1">
SELECT 
COUNT (*) AS Ordersnum,
SUM(price) AS ordersum,
AVG(price)AS orderavg
FROM         overchargestudents,overcharges 
WHERE    (overcharges.orderdate >= '#startdate#') AND (overcharges.orderdate <= '#enddate#') 
AND (overcharges.cardType = #form.CCNumber#) AND (overchargestudents.stukey = overcharges.stukey)
</cfquery>

Thanks
Last edited by peter_budo : Feb 10th, 2008 at 5:36 am. Reason: Please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Posts: 2
Reputation: federod is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
federod federod is offline Offline
Newbie Poster

Solution Re: Need help with NULL values

  #2  
Feb 7th, 2008
I figured it out thanks anyways
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ColdFusion Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 11:57 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC