Migrating Microsoft Access Queries
into Stored Procedures and Views

Each Access query must be placed into this set of statements:

CREATE PROCEDURE <NAME_HERE> AS

< SELECT, UPDATE, DELETE, INSERT, CREATE TABLE statement from Microsoft Access >

GO

  

CREATE VIEW  <NAME_HERE> AS

<Place (SELECT only, with no parameters) Microsoft Access Query>

GO

  

For each Access query:

  1. Open Access, and then in SQL Server, open SQL Server Query Analyzer.
  2. In Access, in the Database window, click the Queries tab, and then click Design.

  1. On the View menu, click SQL.
  2. Paste the entire query into SQL Server Query Analyzer.
  3. Either test the syntax and save the Transact-SQL statement for later use, or run the statement in the database. You can optionally save the Transact-SQL to a script.