Is this SQL? If so the datasource is not database dependent (although you
should specify a default database when setting up the odbc datasource). It
is only server dependent.
Therefore, assuming that AClient is the default database for the ODBC DSN
then I think you need the following:
INSERT INTO Customer_Kit
SELECT *
FROM ProdCenter.dbo.Task
WHERE 1=1
AND Task.Task_ID IN (#PreserveSingleQuotes(Form.Task_Selected)#)
where ProdCenter is the other database and task is the table within this
database
-----Original Message-----
From: Mike Deane [mailto:[EMAIL PROTECTED]]
Sent: 22 August 2000 15:20
To: '[EMAIL PROTECTED]'
Subject: CFQUERY, using two different DBs question - Newbie ;)
<cfquery name="Insert" DATASOURCE="AClient" username="sa" password="">
INSERT Customer_Kit
SELECT *
FROM dbo.ProdCenter.Task
WHERE 1 = 1
AND Task.Task_ID IN (#PreserveSingleQuotes(Form.Task_Selected)#);
</cfquery>
I am trying to move some data from one DB,table (ProdCenter,Task)
>>>FROM dbo.ProdCenter.Task<<< into another DB,table (AClient,
Customer_Kit).
How do I accomplish this feat? For instance, how do I provide a second
DATASOURE to access the second DB?
Thank you.
/mdeane
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.