I want to take the results of a query and insert the results into an Oracle
table.  Looking into the books, it really doesn't cover anything like that.
Here are some of the basic elements I have so far.

This code works except for the fact it will only insert on 1 record.  Do I
use CFLOOP or what.  Thanks for the guidance.

<CFQUERY NAME="MakeExcel" DATASOURCE="DSTS">
        SELECT  B.ENDITEMPN, B.ENDITEMSN, B.LOCATION, C.PRESSURENAME,
A.END_ITEM_NAME
        FROM            DSTS.END_ITEM A, DSTS.PRESSURE_REQTS C,
DSTS.ENDITEMSTORAGE B
        WHERE   (A.ENDITEMPN = B.ENDITEMPN) AND (B.ENDITEMPN = C.ENDITEMPN)
</CFQUERY>  

<cfoutput>
<CFSET ENDITEMNAME = #MakeExcel.END_ITEM_NAME#>
<CFSET ENDITEMPN = #MakeExcel.ENDITEMPN#>
<CFSET ENDITEMSN = #MakeExcel.ENDITEMSN#>
<CFSET LOCATION = #MakeExcel.LOCATION#>

<cfquery name="getRecord" DATASOURCE="DSTS" >
        INSERT INTO DSTS.EXCELEXPORT
                (ENDITEMNAME,ENDITEMPN,ENDITEMSN,LOCATION)      
                VALUES('#ENDITEMNAME#','#ENDITEMPN#',
'#ENDITEMSN#','#LOCATION#')                     
</cfquery> 
</cfoutput>

Jim Ray



------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to