Database Reference
In-Depth Information
The Save button
The Save As
dialog box
Type the query
name SQL-Query-
CH02-01 here
The OK button
Figure 2-14
The Save As Dialog Box
not allow us to save queries (although they do allow us to save SQL Views within the database
and SQL query scripts as separate files—we will discuss these methods later).
Saving a Microsoft Access SQL Query
1.
To save the query, click the Save button on the Quick Access Toolbar. The Save As
dialog box appears, as shown in Figure 2-14.
2.
Type in the query name SQL-Query-CH02-01 and then click the OK button. The
query is saved, and the window is renamed with the query name. As shown in
Figure 2-15, the query document window is now named SQL-Query-CH02-01, and a
newly created SQL-Query-CH02-01 query object appears in a Queries section of the
Navigation Pane.
3.
Close the SQL-Query-CH02-01 window by clicking the document window's Close
button.
4.
If Microsoft Access displays a dialog box asking whether you want to save changes to
the design of the query SQL-Query-CH02-01, click the Ye s button.
At this point, you should work through each of the other nine queries in the pre-
ceding discussion of the SQL SELECT/FROM/WHERE framework. Save each query as
SQL-Query-CH02-##, where ## is a sequential number from 02 to 09 that corresponds to the
SQL query label shown in the SQL comment line of each query.
Using SQL in Microsoft SQL Server 2012
Before you can use SQL statements with Microsoft SQL Server, you need access to a com-
puter that has Microsoft SQL Server installed and that has a database with the tables and data
shown in Figures 2-3, 2-4, and 2-5. Your instructor may have installed Microsoft SQL Server in
your computer lab and entered the data for you. If so, follow his or her instructions for access-
ing that database. Otherwise, you will need to obtain a copy of Microsoft SQL Server 2012 and
install it on your computer. Read the appropriate sections of Chapter 10A about obtaining and
installing SQL Server 2012.
Figure 2-15
The Named and Saved
Query
The query window is
now named
SQL-Query-CH02-01
The Queries section
of the Navigation Pane
The SQL-Query-
CH02-01 query object
 
Search WWH ::




Custom Search