• 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

1 Solution
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
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

<cfloop query="GetDataA">

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

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