|
I was under the impression that <cfquery name="qMyquery"
datasource="#dsn#"> SELECT COALESCE(sum(mytable.Amount),0)
AS myAmount FROM etc,… would return a numeric value of 0 if the query returned no
records and therefore had nothing to sum. So, that when I try something
like: <cfoutput>#DollarFormat(qMyquery.myAmount+qMyQuery2.ccAmount)#</cfoutput> And it tries to add the two values together it wouldn’t
give me the error of: The value "" cannot be converted to a number
Is that not the case or am I doing something wrong in the
way I have this written? I basically have to sum the amount of some transactions
and add them together with other sums and subtract out some other fees. In
one of the tables most users will not have transactions and therefore the query
will be empty and therefore there will not have anything to add. Can anyone tell me what am I overlooking? Tim Starling This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com |
_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.HostMySite.com www.teksystems.com/
