You are correct.  QoQ can be a bear to work with when handling null values with 
non-string datatypes.  Your best bet, is to exclude those with 

WHERE number IS NOT NULL  (CF treats empty strings as NULLS for SQL purposes)

and, if you need those null records, us an “IS NULL" query separately or with a 
UNION statement.

SELECT * from qNumber

UNION

SELECT * from qNoNumber

The above is intensive in processing so I wouldn’t recommend it if the 
recordset is large.

HTH,

Jon



On Dec 2, 2013, at 6:05 PM, John M Bliss <bliss.j...@gmail.com> wrote:

> 
> Hi! I have a query result set stored as WDDX in a text file. Set includes a
> numeric column with some null values:
> 
> <field name='COSTS'>
>   <null/>
>   <null/>
>   <number>50.94</number>
> etc
> 
> I can read this file, do a wddx2cfml on it, and then do query-of-query on
> the results with no problem. The problem happens when, in my QoQ, I try to
> order by costs. That produces:
> 
> java.lang.Double cannot be cast to java.lang.String
> 
> Am I correct to assume that's being caused by the null values? If so,
> what's the best/easiest way to fix that? If not, what might be causing this?
> 
> -- 
> John Bliss - http://about.me/jbliss
> 
> 
> 

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

Reply via email to