• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfquery of query not working in CF2016

New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

I have a query which has run well on our old server. However we've upgraded to CF2016 and yet when I run a query of a query I get no results.

<cfquery datasource="travcomus" name="firstquery">

  SELECT * FROM tablename

</cfquery>

Followed by

<cfquery dbtype="Query" name="secondquery" >

  select * from firstquery

</cfquery>

Any ideas?

Views

539

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

Do you get absolutely nothing in return?  Or an error message?  Have the CFAdmin logs provided anything?

If you do a CFDUMP of both queries, does the second one show as empty?  Or that it doesn't exist?

I'm not at all familiar with CF2016, so I have to ask.

V/r,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

It shows as empty and the CFAdmin logs aren't returning anything useful

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

Hmm..

Well, this probably isn't the response you were hoping for, but..  instead of using SELECT * (which honestly I despise), try selecting specific column names in both queries.  If that doesn't do it, and the CFDUMP  of the first query is providing the expected data, then my next move would be to check CF2016 documentation to assure myself that my QoQ code is correct.  If it is, then you may want to file a bug with Adobe at bugbase.adobe.com and see if anyone else either has a solution, or the dev team acknowledges it as a bug.

HTH,

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

My problem is it works on our dev server. I am sure it's buried somewhere in the admin settings, just for the life of me I can't find it. Can't find any notes stating that the exact functionality is depreciated so it's not that. Thanks anyway

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 01, 2016 Dec 01, 2016

Copy link to clipboard

Copied

LATEST

Try this (pun 😞

<cftry>

<cfquery datasource="travcomus" name="firstquery">

  SELECT * FROM tablename

</cfquery>

<cfquery dbtype="Query" name="secondquery" >

  select * from firstquery

</cfquery>

<cfdump var="#firstquery#" label="firstquery">

<cfdump var="#secondquery#" label="secondquery">

<cfcatch type="any">

<cfdump var="#cfcatch#">

</cfcatch>

</cftry>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation