When building dynamic query wher query gets name in using variable, I have problem outputing query RecordCount where the name of the query is variable
<cfset queryName = "testing">
<cfquery name="#queryName#" datasource="dataBaseName">
SELECT COUNT(fileSubCategory) as fileCount
FROM Background;
</cfquery>
<cfoutput>
Background Count: #RecordCount.<---I need here a variable value to be accepted:--->#queryName# #<br>
</cfoutput>
Is this possible scenario?
<cfset queryName = "testing">
<cfquery name="#queryName#" datasource="dataBaseName">
SELECT COUNT(fileSubCategory) as fileCount
FROM Background;
</cfquery>
<cfoutput>
Background Count: #RecordCount.<---I need here a variable value to be accepted:--->#queryName# #<br>
</cfoutput>
Is this possible scenario?