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
0
votes
3 answers

Query of queries not extracting data with data type mismatches

My client has two databases, one for the latlng of places and another database for every other table (why I don't know). I'm working off of coldfusion and from what I can tell I need to do a query of queries since CF doesn't allow for multiple…
rajh2504
  • 1,266
  • 2
  • 21
  • 37
0
votes
0 answers

How to load all data specified in one query of query (1st datasource - 2 tables) and just some data from another query (2nd datasource - 1 table)?

I'm completely new here and I'm more oriented in infrastructure and server management, but sometimes I have to change/create some small code in ColdFusion for our company. Now I have simple task, but with very complicated code. I have 2 datasources…
0
votes
2 answers

Get max value of an query column

i am trying to loop through a query, to get the highest createdTime. The column instanceId is a GUID (string) what gives me this error: The reference 396B3850 is the beginning of an instanceId
dewey
  • 809
  • 2
  • 16
  • 47
0
votes
1 answer

How To Make My Coldfusion Code More Efficient Using Query of Queries

I have some code that I am trying to make more efficient. I am running a query and then looping through those results and running additional queries to drill down into my data even further. The code takes long to process and I'm sure that it is not…
Brian Fleishman
  • 1,237
  • 3
  • 21
  • 43
0
votes
1 answer

QoQ: LIKE comparison not returning all records expected

First time poster. I can normally figure these things out on my own. But alas I've hit a brick wall. The basics here is I'm trying to hack in a product catalog into a custom CRM system that I have. I use a DAO system to pull data from the database…
inozzel
  • 3
  • 3
0
votes
0 answers

Case statement in select oracle compare multiple columns

I have a query object that I am creating in coldfusion, which returns columns looking like this - score, score_1, score_2, item_id, title etc... I want to write another query where it checks which one of the 3 columns that is score, score_1, score_2…
user747291
  • 821
  • 3
  • 20
  • 43
0
votes
1 answer

Coldfusion query of queries count by date

I'm trying to get an count based on two dates and I'm not sure how it should look in a query. I have two date fields; I want to get a count based on those dates. SELECT COUNT(*) FROM Table1 Where month of date1 is one month…
Patrick Schomburg
  • 2,494
  • 1
  • 18
  • 46
0
votes
1 answer

Can I use Coldfusion Query of queries on two different query results?

I'm trying to use Query of Queries based on two separate queries but I'm not getting the result I want. I would consider myself beginner in both SQL and Coldfusion. I'm using Coldfusion 2016 and SQL Server 2012. Initial request: Give me the name of…
airpolgas
  • 77
  • 7
0
votes
5 answers

Filtering a list of names from query

I have a query something like: SELECT * FROM qAll WHERE name not in('Alina,Charaidew,Sukapha') which is not working. What will be the best way to do so? As this list a generated dynamically and maybe different every time.
user3733648
  • 1,323
  • 1
  • 10
  • 25
0
votes
1 answer

Using Spreadsheet in Query of Queries

I am reading a spreadsheet any trying to then run it in a query or Queries
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
0
votes
3 answers

Using a wildcard operator in a query of query

I have the following code: SELECT somecolumn1, somecolumn2, somecolumn3 FROM sometable WHERE someid =
Charles Robertson
  • 1,760
  • 16
  • 21
0
votes
1 answer

Sorting in alphabetical order from QoQ result column

I have a result set returned from a SP which is then manipulated in a QoQ. The results are being displayed in ABCabc order. I want them in AaBbCc order. For example, say the "names" column contains the values "Steve, Andy, anuj, bill, Mike" . When…
CFML_Developer
  • 1,565
  • 7
  • 18
0
votes
1 answer

Error incorrect select list on query?

I have three queries: select submitterdept, COUNT(*) AS 'not_approved_manager' from [Intranet].[dbo].[CSEReduxResponses] where status =0 and approveddate is null group by…
user3591637
  • 499
  • 5
  • 20
0
votes
2 answers

How to use one result set to generate multiple manipulated result sets from that without hitting the db multiple times?

I am designing a report using ColdFusion and SQL. The reprot is having 3 section. Now all the 3 sections are using the same set of data but manipulate it differently to show different results. I have used CTE for this. I have written 3 quires for…
Deepak Kumar Padhy
  • 4,128
  • 6
  • 43
  • 79
0
votes
2 answers

This is weird issue I am geting while doing Query of Query

Here is the scenario, I am getting the result-set from the following code and i am running the following below query after getting the result from cfdump, but it shows empty second dump, do not why? can anyone check what is wrong:
Regual
  • 377
  • 1
  • 5
  • 20