Query of queries Error

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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....
    2. 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...
    3. 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...
    4. 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...
    5. 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'...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139