Ask a Question related to Coldfusion Database Access, Design and Development.
-
Tulsa #1
Query of queries Error
I am putting query results into a new query to sort them, rather than using
arrays. I can insert into a new query using queryNew just fine and even
display the results fine. The error comes when I try query the query. Here is
the error:
Query Of Queries runtime error.
Unsupported Numeric type conversion in Query of Queries.
The error occurred in
E:\Inetpub\wwwroot\developers\brown\abxy_match\fin d_match.cfm: line 73
71 :
72 :
73 : <cfquery dbtype="query" name = "mattQuery2">
74 : SELECT *
75 : FROM mattQuery
--------------------------------------------------------------------------------
SQL SELECT * FROM mattQuery
Here is the relevant code. Thanks for any help.
<cfset mattQuery = QueryNew("Store, Part, Description, qty, Sales, Value")>
<cfset newRow = QueryAddRow(mattQuery, get.recordcount)>
<cfoutput query="get">
<cfquery name="chk_others" datasource="myrmps">
select is_store, sum(rs_q1 + rs_q2 + rs_q3) as q_sales
from invs, rinvs
where is_store = rs_store
and is_part = rs_part
and is_dead in ('A','B')
and is_part = '#get.is_part#'
and ((rs_q1 + rs_q2 + rs_q3) / #get.is_qty#) >= #rate#
group by 1
order by is_store
limit 1
</cfquery>
<cfset temp = QuerySetCell(mattQuery, "Store", chk_others.is_store,
get.currentrow)>
<cfset temp = QuerySetCell(mattQuery, "Part", get.is_part, get.currentrow)>
<cfset desc = trim(get.i_desc) & trim(get.i_desc2)>
<cfset temp = QuerySetCell(mattQuery, "Description", desc, get.currentrow)>
<cfset temp = QuerySetCell(mattQuery, "qty", get.is_qty, get.currentrow)>
<cfset temp = QuerySetCell(mattQuery, "Sales", chk_others.q_sales,
get.currentrow)>
<cfset t_dollars = get.is_wac * get.is_qty>
<cfset temp = QuerySetCell(mattQuery, "Value", t_dollars, get.currentrow)>
</cfoutput>
<cfquery dbtype="query" name = "mattQuery2">
SELECT *
FROM mattQuery
ORDER by Store
</cfquery>
Tulsa Guest
-
Query Of Queries runtime error in CFMX 7
Hi, I am migrating from CF 5 to MX 7. All the queries are working fine in the old version. However when I try the same code in MX7 I get errors.... -
Query Of Queries runtime error. Unsupported typecomparison.
Hello, I have very simple code which runs a query of all records in a table t_attributes. Just below this querie, I run a Query of Queryies on... -
Query Of Queries syntax error
Hello I am running a Query of Queries and I'm getting the following error: Query Of Queries syntax error. Encountered "Section" at line 0, column... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
Query of Queries runtime error
this also happened to me, on a different account. For me it happened on ORDER BY #url.o# #url.s# I have a <cfparam name='url.o'... -
Tulsa #2
Re: Query of queries Error
Sorry to answer my own question but I found a workaround in the MM forums.
Here is the link
[url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=6&thread[/url]
id=796067&enterthread=y
I had to turn all values being inserted into the new query into strings by
concatenating a "".
Tulsa Guest



Reply With Quote

