Linked tables in SQL server 2008 express
I am migrating an ACCESS 2000 to SQL express 2008 and am having trouble with the linked tables. Is there a way to replicate the 开发者_开发知识库ACCESS linked tables to SQL?
Thank you
You can use the upsizing wizard or the Microsoft SQL Server Migration Assistant 2008 for Access. Once you have the tables on your SQL server you can then link them using either the normal table linking method or through code if you want to be fancy
EDIT:
If they are on the same physical box then one way is to make views of the table using the full 3 name. In the below example I’m creating a view in the database Tracker_3 that is looking at the table tblStaff_details in the database Skyline_common
USE [Tracker_3] GO
create view [dbo].[tblStaff_details] as select * from Skyline_common.dbo.[tblStaff_details]
GO
What I want to do is link a database from SQL express (Database db1, Table tbl1) to SQL express (Database db2, Table tbl2)... How can I do this?
Uh, if db1 and db2 are the names of the databases on the same server, it is quite easy to query between different databases.
select *
from db1.dbo.tbl1 inner join db2.dbo.tbl2
on tbl1.employeeid = tbl2.managerid
Hope that helps.
精彩评论