Dumping A Select/Insert Query
I have a query that does a select/insert:
:::sql
INSERT
INTO myTable (...)
SELECT (...)
FROM theOtherTable
WHERE 1=1
I was trying to figure out what was going on in this query but doing a simple cfdump of ‘data’ was throwing an error (btw this is on CF8). Reading the docs I noticed there is a “results” attribute:
Specifies a name for the structure in which
cfquery
returns the result variables.
So I modified my query to add a result and then dumped that and it worked!
:::cfm
<cfquery name="data" result="testdata">
<cfdump var="#testdata#">
Hopefully this is helpful to others…