DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS   SQL 2014 PROGRAMMING   DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
How to link to an Access database?

You can establish an Access database as a linked server to Microsoft SQL Server and query it with OPENQUERY. Here are some setup examples:

EXEC sp_addlinkedserver
  @server = 'Warehouse',
  @provider = 'Microsoft.Jet.OLEDB.4.0',
  @srvproduct = 'OLE DB Provider for Jet',
  @datasrc = 'e:\access\warehouse.mdb'
GO

SQL Server linked server setup to Access 2007 database:

EXEC sp_addlinkedserver
  @server = 'NYCInventory',
  @provider = Microsoft.ACE.OLEDB.12.0',
  @srvproduct = 'OLE DB Provider for ACE',
  @datasrc = 'e:\access\nycwarehouse.accdb'
GO

This is how you can query a linked Access database:


SELECT * FROM OPENQUERY(Warehouse, 'SELECT SKU, Item, Description, Quantity FROM dbo.Inventory')
GO

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE