I need to get the recordcount
of the insert into select
query using cfquery.
While testing with a simple query I'm unable to get the desired result.
I'm always getting the recordcount as 1.
Code :
<cfquery name="Q_Test" datasource="DATABASE" result="queryresult">
INSERT INTO GS_TEMP
SELECT TRUNC (SYSDATE - ROWNUM) dt
FROM DUAL CONNECT BY ROWNUM < 366
</cfquery>
<cfdump var="#queryresult#">
Output:
Is this expected?
If you want to get the number of rows then you can do:
Oracle
ColdFusion
(Not tested the above code but it should be mostly correct)