Eric,
What database are you using?

If you have access to 'Sql Server 2005 Enterprise', then you can attach the
second datasource as a 'linked server'.  By doing this you have the ability
to write your queries using 4part dot notation (not very efficient), or you
can use openquery() or Execute()at foo.

In this way you can do all sorts of fancy joins.

William

----------------------------------
William Seiter
IT Web Developer / Consultant
 
Is your income limited by the red tape and paperwork?  Let SoftEx BackOffice
help you.  They know how to take care of the 'busy work' of your contracts
and let you focus on the 'WOW' factor.
http://www.softexconsulting.com/softex_office.cfm

::-----Original Message-----
::From: Eric Roberts [mailto:[EMAIL PROTECTED]
::Sent: Thursday, October 16, 2008 12:24 AM
::To: cf-talk
::Subject: RE: Streamlining an insert
::
::This is coming from a different datasource, so I need a way to use a
::cfquery
::resultset in the insert. I wish cfquery allowed one to specify a different
::datasource from within a query.
::
::Eric
::
::
::/*-----Original Message-----
::/*From: Ryan Stille [mailto:[EMAIL PROTECTED]
::/*Sent: Wednesday, October 15, 2008 4:49 PM
::/*To: cf-talk
::/*Subject: Re: Streamlining an insert
::/*
::/*This is how you'd do it with MySQL:
::/*
::/*INSERT INTO tablename (x,y,z) SELECT x,y,z FROM othertable
::/*
::/*If you are using MSSQL, I'm sure its something similar.
::/*
::/*-Ryan
::/*
::/*Eric Roberts wrote:
::/*>
::/*>
::/*> I have been trying to come up with a more streamlined way to update
::the
::/*> contents of a table with data that is coming from a different
::database.
::/*Is
::/*> there a way to use in the values clause a reverence to a record from a
::/*cf
::/*> query instead of actually typing out all of the variables?  Something
::/*along
::/*> the lines of:
::/*>
::/*>
::/*>
::/*> Insert into table(x,y,z)
::/*>
::/*> Values(#queryname[currentrow]#)
::/*>
::/*>
::/*>
::/*> Or is there a way to use cfinsert or some other process where I could
::/*> essentially pass the query object so that I can insert the data
::without
::/*> having to loop and do each insert individually?
::/*>
::/*>
::/*>
::/*> Thanks!
::/*>
::/*>
::/*>
::/*> Eric
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*>
::/*
::/*
::
::

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313996
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to