I have created a query using the QueryNew and QueryAddColumn functions.
My data is output correctly until I start trying to interrogate it using
query of query.
For Example, if I have a column called "cost" with the values 6000,
50000, 40000, 3000, 2000 and want to pull out only the records where the
data is greater than 30 *THOUSAND*, I would write the following:
<cfquery name="qCost" dbType="Query">
SELECT cost
FROM request.MyQuery
WHERE cost > 30000
</cfquery>
The recordset returned is 6000, 50000, 40000.
It seems that the column is being treated as text rather than Numeric.
The strange thing is, if I order the query by "cost" descending, I get
50000, 40000, 6000 - the correct numeric order.
I know there are a few known bugs with Query of Query and was wondering
if this is one of them?
I have thought about taking the data and creating a temporary table in
SQL Server and dumping the data in there to interrogate it properly.
Does anyone know of a better solution, or even better, a fix for my
code? This is an integral part of my application.
Many thanks,
Ryan Edgar
Web Applications Developer
BizNet
biznet-solutions.com
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists