Hello - 

I am attempting to multiply variables to produce a calculation.

The calculation is:  <cfset varA = paddedLeadTime*avgStoreData.avgNum>

PaddedLeadTime comes from a variable created from a query:
<cfset paddedLeadTime = #getParts.leadTime# + 21>
LeadTime may contain null values so I have used isNull in the query: 
ISNULL(n.leadTime,0) as 'leadTime'

avgStoreData.avgNum comes from a QoQ:
        select count(distinct(ordernum)) as AvgNum
        from getAvgStoreData
        where partnum = '#getparts.partnum#'

When multiplying the variables, <cfset varA = 
paddedLeadTime*avgStoreData.avgNum>,
an error occurs stating:  The value '' cannot be converted to a number.  Is 
this because one of the values is null?  How can I alleviate this error?



Thank you. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5802
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to