Do I understand correctly...you want to copy a table from datasource1 to
datasource2?  Presuming the table already exists:

<CFQUERY NAME="t1" DATASOURCE="brian">
select a from test1
</CFQUERY>

<cfoutput query="t1">
        <CFQUERY NAME="t2" DATASOURCE="brian">
           insert into test2 values ('#t1.a#')
        </CFQUERY>
</cfoutput>



If the table does not exist already, you have a different problem.  CF
doesn't do DML, so you have no way to create the table using only CF tags
(if I'm missing something, I'm sure someone will correct that).

To create a table from one DS to another, I would use the data dictionary to
get a list of the table names, etc and create a string holding the SQL
needed to create a table.  Pass that string to a PL/SQL stored proc on the
second datasource to be executed.  Then, returning to CF, I would proceed as
above.  Not trivial code.

Brian


-----Original Message-----
From: Terry Troxel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 9:32 AM
To: CF-Talk
Subject: Copying tables thru ODBC


Can anyone give me an example on how to copy a table from one ODBC data
source to another remotely using Cold Fusion calls?

Sure would appreciate it.
Terry Troxel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to