---------- Original Message ----------------------------------
From: "Leonardo Crespo - Cftop.COM" <[EMAIL PROTECTED]>
>Query Of Queries runtime error.
>Unsupported type comparison.
I had a similar problem recently and we had this workaround. Maybe it will work for
you.
We had to take our initial query, create a new temporary query out of that data with
the first row full of empty strings. Then, we query THAT temporary query, making sure
to not get that blank first row again.
I'm attaching our code to clarify. Our initial query is called "rQuery".
I hope that helps for you.
<!---
Fix for Query of Query bug
Fix requires creating a new temporary query from rQuery, inserting the first row
as
series of empty strings. Then, we query the new temporary query without getting
the blank
first row.
--->
<cfset qTmp =
QueryNew("patient_seq_no,descr,date1,date2,date3,date4,date5,date6,analyte_no,orderofsel,patidentifier")>
<cfset tmp = QueryAddRow(qTmp, 1)>
<cfset tmp = QuerySetCell(qTmp, "patient_seq_no", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "descr", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date1", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date1", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date3", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date4", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date5", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "date5", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "analyte_no", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "orderofsel", "", 1)>
<cfset tmp = QuerySetCell(qTmp, "patidentifier", "", 1)>
<cfloop query="rQuery">
<cfset tmp = QueryAddRow(qTmp, 1)>
<cfset tmp = QuerySetCell(qTmp, "patient_seq_no", tostring(patient_seq_no),
qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "descr", tostring(descr), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date1", tostring(date1), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date1", tostring(date2), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date3", tostring(date3), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date4", tostring(date4), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date5", tostring(date5), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "date5", tostring(date6), qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "analyte_no", tostring(analyte_no),
qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "orderofsel", tostring(orderofsel),
qTmp.recordcount)>
<cfset tmp = QuerySetCell(qTmp, "patidentifier", tostring(patidentifier),
qTmp.recordcount)>
</cfloop>
<cfquery dbtype="query" name="GetReport">
select * from
qTmp
WHERE
patient_seq_no <> ''
order by patidentifier, orderofsel, descr
</cfquery>
--------------------------------
Scott Brady
http://www.scottbrady.net/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4