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
1
vote
2 answers

Query of Queries not matching empty string

I have a the output from a stored procedure on a SQL Server that I am running a query of queries on in CF9. I don't have any access to the stored procedure to make any changes, but I can output the contents. My problem is that my QofQ is matching…
Nathaniel
  • 21
  • 2
1
vote
2 answers

Var scoping issue possibly?

A few times in my functions I have stuff like this: SELECT columnName FROM tableName SELECT columnName FROM…
Leeish
  • 5,203
  • 2
  • 17
  • 45
1
vote
1 answer

cfquery not executing in cfc file

I am from a PHP background and am very new to ColdFusion. I am using ColdFusion-10 I have created two files: a cfm file and a cfc file. When I am executing a query using cfquery in cfm file it is working. But when I am executing same in a cfc file,…
Dinesh Patra
  • 1,125
  • 12
  • 23
1
vote
2 answers

Escape apostrophe in Query of Query

I'm trying to do this: Select STOCK, CUST_NUMBER From GetExtractionData WHERE CUST_NUMBER NOT LIKE '\'' The cust_number is either ' (for blank) or ' followed by a 10…
Patrick Schomburg
  • 2,494
  • 1
  • 18
  • 46
1
vote
1 answer

Count # of occurrences in time span in SQL

If I have data stored in a db like so. fk start end 1 1000 1100 1 1030 1130 2 1000 1100 How can I write my query so I can get a result like: fk timeslot occurences 1 1000 1 1 1030 2 1 …
Leeish
  • 5,203
  • 2
  • 17
  • 45
1
vote
1 answer

Get error on a query on a query?

I have this query SELECT TOP (1) WITH TIES emp_id, SUM(execoffice_status) AS total_max FROM CSEReduxResponses GROUP BY emp_id ORDER BY total_max DESC
user3408399
  • 109
  • 1
  • 2
  • 12
1
vote
2 answers

Query of Queries failing in Coldfusion 10

I'm getting and error when I tried to do a query of query. Table named allData was not found in memory. The name is misspelled or the table is not defined. I have an excel document and I'm outputting to a coldfusion var called allData, then I'm…
ConfusedDeer
  • 3,335
  • 8
  • 44
  • 72
1
vote
1 answer

Why am I getting erroneous records in a Query-of-Queries with LIKE conditions?

I have an ColdFusion 8 application that caches a large query every 2 minutes using a Scheduled Task. This query contains product data. This data is used in AJAX calls for auto-complete logic, which is the primary reason it is cached, since it takes…
Eric Belair
  • 10,574
  • 13
  • 75
  • 116
1
vote
1 answer

Sorting CFQuery Results by Month

Some Backround: ColdFusion9 MSAccess Database I am trying to create a CFChart to compare data in a table labeled closed_tickets. I am comparing this year's data to previous year's data and would like to chart it by month. I am querying the table and…
Brian Fleishman
  • 1,237
  • 3
  • 21
  • 43
1
vote
1 answer

Coldfusion QoQ incredibly slow

The query has around 40k rows taken generally from a cached query. For whatever reason the QoQ is just SLOW. I have tried to remove most of the logic (distinct, grouping etc) to no avail which leads me to believe something is wrong in the settings.…
Magic Lasso
  • 1,504
  • 5
  • 22
  • 29
1
vote
3 answers

ColdFusion 9 - Top n random query results

I've got a series of queries that I do to get 5 results at random, the problem is that it is taking a while to get through them, mostly because it involves a loop to assign a rand value that I can order by (which Railo can do in-query) I was…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
1 answer

Outgoing message queue for MVC

All of my FW/1 controllers extend extend base.cfc. In base.cfc there is a function called addMessage(). Messages are thing like "You have successfully logged in". "There is an error in your data", "Error occurred while processing request. The…
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
1
vote
2 answers

coldfusion QoQ and conditionals

I've asked a question( Query with grouped results by column (SQL Server) ) a while back. And got some answers that work on the SQL server, but I can't get them to work as part of a QoQ. Turns out CF has some minor limitation, like not being able to…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
2 answers

Have you seen this weird QoQ Error [ColdFusion]?

I have confirmed that the first query works as expected select shipViaName,TOTALSHIPRATE from s_c_c.qShipCalc WHERE sku in…
Travis Heeter
  • 13,002
  • 13
  • 87
  • 129
0
votes
4 answers

ColdFusion 8 - Not show comments in html source

When I write a cfc in ColdFusion 8, in the source code ColdFusion shows these comments: .. .. ...