• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 138
  • Last Modified:

Using 2 ODBC Drivers in a query

Is there anyway to use a CFQUERY tag to create a query that uses to separate ODBC datasources ?  This query would be used to insert data from one datasource into the other.

I would be grateful for all advice offered regarding this.

Thanks in advance

John
0
johnclarke
Asked:
johnclarke
1 Solution
 
FRehmanCommented:
I think there is possibility to add two data source in on cfquery
due to my knowledge of ur problem I suggest you that you define one query first and select all the records from table then you define other query and insert the previous record from first datasource into this datasource
hope this will help you
0
 
jdev011599Commented:
There may be a more efficient way to do this, but I can't think of it at the moment.

<cfquery name="GetDataA" datasource="dbA">
select id,data from DataA
</cfquery>

<cfloop query="GetDataA">

<cfquery name="AddToB" datasource="dbB">
insert into DataB(data) values('#data#')
</cfquery>
</cfloop>
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now