Thank you.  These are both SQL Server 7 databases.  This is great.
Thanks.

-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 22, 2000 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: 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?

OK, firstly it helps immeasurably to know which database driver you're
using

Secondly, if they are different drivers then it's more difficult than if
they are the same - SQL Server will talk to others, but not as nicely as
it
does it's own

IF you're using SQL Server, then it's easy

select t1.*, t2.*
from mainTableName as t1, databaseName.dbo.tableName as t2
where t1.field1=t2.field2

This will talk to another database, which doesn't need a DSN

If you're using Access (spit), then you can refer to the database by
location rather than name - it's ugly, but it works, and I can't
remember
the exact syntax as I haven't used for ages

Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


------------------------------------------------------------------------
------
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.

Reply via email to