Questions tagged [qoq]

ColdFusion Query of Queries (QoQ) is used to re-query the result of one or more original queries.

ColdFusion Query of Queries (QoQ) let you query the results of an existing database query. A QoQ uses the <cfquery> and is very similar to querying against a database. Example:

<cfquery name="this.qryReportDefGroup" dbtype="query">
    SELECT  SourceTypeID, cyclelocked
    FROM    request.stData.qryReportDefGroup
</cfquery>

The FROM statement in this case references a variable that is a part of a structure. The SQL inside of a QoQ is specific to ColdFusion. The results of a QoQ can be used in yet another QoQ.

You can also query a non-database query object, for example, the results of a cfftp directory listing. src: http://www.quackit.com/coldfusion/tutorial/coldfusion_query_of_queries.cfm

83 questions
2
votes
2 answers

Coldfusion 9: Round to 2 decimals on avg() in QoQ

Is there a way to round to 2 decimals in a query-of-query on an avg statement? I could not find a system function in the adobe docs.
Marius
  • 3,043
  • 1
  • 15
  • 24
2
votes
3 answers

ColdFusion QOQ, compare time values?

I'm trying to execute the below code using ColdFusion QOQ but it's not retrieving any records. I am using time in format "HH:mm" and using MySQL as backend and the original time column has a datatype of "TIME".
Saurabh Sharma
  • 317
  • 2
  • 11
2
votes
3 answers

ColdFusion (Railo) QoQ - Nulls Last

My understanding is that nulls last is not possible with QoQ. How do I trick coldfusion into sorting null values last whether i'm sorting the row ascending or descending? I've tried using case in the SELECT and ORDER part of query, but looks like CF…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
1 answer

Coldfusion MySQL Query of Queries date selections

I'm trying to query a query in Coldfusion with a timestamp field (yyyy-mm-dd HH:mm:ss) reformatted to a specific date. I can get the original query to "date format" fine but I can't get the query of query to select the date. I have tried changing…
Wade H
  • 57
  • 7
1
vote
1 answer

Issue with ColdFusion Query of Query after upgrading ColdFusion server from CF9 to CF21

I cannot figure this out. My company recently upgraded our ColdFusion Server from CF9 to CF2021. One of my pages uses queries of queries to run. Prior to the upgrade the page worked fine. However after the upgrade the query of query where statement…
user1978340
  • 101
  • 1
  • 13
1
vote
2 answers

Query of Query returning me full return instead of filtered ones

I have this query derived from original query, original query has 50 records and the qoq should give me 30 rows, but it is giving me full 50 rows, what i am doing here here is my Query of Query Select…
Jan
  • 85
  • 7
1
vote
2 answers

ColdFusion | Query timeout error questions

Here is my code SELECT employee, salary FROM employee SELECT employee, salary FROM…
Tushar Bhaware
  • 2,525
  • 1
  • 16
  • 29
1
vote
1 answer

how to use Queryfilter function when I have to get results in terms Order by clause

I am getting error when trying to execute the below code: myQuery = queryNew("id,name,amount","Integer,Varchar,Integer", [ {id=1,name="One",amount=15}, {id=2,name="Two",amount=18}, …
S M
  • 159
  • 2
  • 13
1
vote
2 answers

Using cfloop with queryfilter function

I am new to ColdFusion and trying to use cfloop for the below code: var origRate = 0; var toRate = 0; rates = myQuery.filter(function (obj) { return (obj.code == arguments.origCode || obj.code == …
S M
  • 159
  • 2
  • 13
1
vote
1 answer

Is it possible to pass stored procedure result to another cfstoredproc in ColdFusion?

I would like to pass the stored procedure result to another stored procedure in ColdFusion. If anyone would be able to help on this.
S M
  • 159
  • 2
  • 13
1
vote
1 answer

Can we use convert(int,Employeenumber) function in a ColdFusion Query of Query?

Can we use convert(int,Employeenumber) function in ColdFusion query of query feature? When I try it I am getting some error. I am getting records from a stored procedure. When I try to re-query those records with a query of query, using the…
Techleadz Team
  • 198
  • 2
  • 15
1
vote
2 answers

ColdFusion Query Of query

This query: SELECT * FROM getlogs WHERE id > #id# AND logType = "login" LIMIT 1 Gives me this error: Error Executing Database Query. Query Of Queries syntax error. Encountered "logType. Incorrect conditional expression, Incorrect conditional…
James T
  • 3,292
  • 8
  • 40
  • 70
1
vote
1 answer

How to Quickly Search a Query

I have an application where almost everything is dynamic. I am creating an edit form for a user and essentially need to search a query to select a group of checkboxes. I have a table assigning the user to programs that holds userid and programid…
Dave Long
  • 9,569
  • 14
  • 59
  • 89
1
vote
2 answers

Q-of-Q Not Respecting Column Order

I am using CFSPREADSHEET to read an XLS file into a query. Then reordering the columns as necessary. However, the query-of-query I am using retains alphabetical column order. The XLS file has the fields in the correct order, but when converted to a…
justacoder
  • 2,684
  • 6
  • 47
  • 78
1
vote
1 answer

Why doesn't Lucee consider column alias name in QoQ

I was comparing the following queries in my local CF & Lucee servers. The ColdFusion server throws a QoQ runtime error. However, when I execute the same queries in Lucee, it returns the needed query results.
Sathish Chelladurai
  • 670
  • 1
  • 8
  • 23