x

An interesting question about joining two databases

How can I join a data mart and Northwind to populate the fact table in the same data mart?

more ▼

asked Mar 03, 2010 at 09:07 PM in Default

avatar image

SA
1 2 3 3

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If these databases are on the same server/instance you can do this using three part name syntax, see below.

select            
    D.*            
    ,N.*            
from            
    DataMart.dbo.TablefromDataMart D            
join            
    Northwind.dbo.Employees N            
on            
    D.KeyField = N.KeyField            
more ▼

answered Mar 04, 2010 at 07:21 PM

avatar image

Jason Cumberland
507 1 2 4

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x273

asked: Mar 03, 2010 at 09:07 PM

Seen: 569 times

Last Updated: Mar 03, 2010 at 09:07 PM

Copyright 2016 Redgate Software. Privacy Policy