SQL Server lets you use one command to quickly create a new table
containing a subset of records from a larger table. For example, suppose in Access you
want to create a phone list for all employees in the Fort Myers region. To do
this, you can create a new table containing only the records of
the central Employee Records database. Follow these steps:
- Open
the database containing the Employees table, then click Queries in the
objects list in the database window. - Click New | Design View | OK.
- Click
Close. - Go to
Query | SQL Specific | Data Definition. - Enter
the following statement:SELECT [Employee ID], [Last Name], [First Name], Phone, City
INTO Phonelist
FROM Employees
WHERE City="Fort Myers" - Click
Run.
Access will insert all employees’ records from the Fort Myers office into the new table called Phonelist.
Miss a tip?
Check out the Microsoft Access archive, and catch up on our most recent Access tips.
Help users increase productivity by automatically signing up for TechRepublic’s free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.