I don't think this is right......you only need 2 dots if you don't specify
an owner.
In fact we are all saying .dbo. but it all depends on who owns the table in
the db.
------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.co.uk/
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 488 9131
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
-----Original Message-----
From: Guy M. Saenger [mailto:[EMAIL PROTECTED]]
Sent: 01 August 2001 17:28
To: CF-Talk
Subject: Re: SQL Question - Complex
What Stuart says below is correct. However, you need to separate the
database name from the table name with 2 dots in TSQL. Therefore,
it becomes ...
INSERT INTO TableOnDB1 (fields...)
SELECT fields...
FROM DB2..dbo.TableOnDB1
--
Guy M. Saenger
[EMAIL PROTECTED]
214.448.8887
----- Original Message -----
From: "Stuart Miller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 9:19 AM
Subject: RE: SQL Question - Complex
> You want to do a cross database join with an INSERT SELECT query:
>
> INSERT INTO TableOnDB1 (fields...)
> SELECT fileds...
> FROM DB2.dbo.TableOnDB1
>
> The "DB2" in the FROM clause needs to be the name of the database (not the
> datasource name).
>
> -s
>
> Stuart Miller
> Rocom New Media
> t: 01937 487492
> e: [EMAIL PROTECTED]
> w: http://www.rocom.co.uk
>
>
>
> -----Original Message-----
> From: Tangorre, Mike [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 3:01 PM
> To: CF-Talk
> Subject: SQL Question - Complex
>
>
> Does anyone know if it is possible to pull from two different databases in
a
> stored procedure?
> What I have is DB1 and DB2, I need to take values from DB1 and insert them
> into DB2...this is
> just the cut and dry of what I am doing... I am actually doing a lot more
> but this is the foundation.
>
> Any ideas?
> T-SQL?
>
> mike
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists