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:
- Open Access, and then in SQL Server, open SQL Server Query Analyzer.
- In Access, in the Database window, click the Queries tab, and then click Design.
- On the View menu, click SQL.
- Paste the entire query into SQL Server Query Analyzer.
- 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.