If you need to use CF, then I think using a cfloop would probably be the
easiest way.

<cfquery name="qryName" ....>
Select * from table1
</cfquery>

<cfloop from="1" to="qryName.recordcount" index="i">
        <cfquery .....>
         INSERT INTO table2
         (var1, var2, var3)
         VALUES
         ('#var1#','#var2#','#var3#')
        </cfquery>
</cfloop>

______________________
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Adrian Cesana [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 06, 2002 12:40 PM
To: CF-Talk
Subject: Duplicate record in another table with CF


I have 2 tables with the same structure, I need to duplicate (INSERT) a
record from table1 to table2 using CF.  Only way I know of would be to
SELECT * then write an INSERT that contained every field.  These tables
have
almost 200 fields, is there some better method of doing this?

Thanks,Adrian

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to