Database Reference
In-Depth Information
To Francesca, the SalesCust view is a real table; she does not need to know what goes on behind the
scenes in order to use it. She could find the number and name of the sales rep who represents customer 282,
for example, by using the following query:
SELECT SNum, SLast, SFirst
FROM SalesCust
WHERE CNum= ' 282 '
;
125
Francesca is completely unaware that, behind the scenes, the DBMS converts her query as follows:
SELECT Rep.RepNum AS SNum, LastName AS SLast, FirstName AS SFirst
FROM Rep, Customer
WHERE Rep.RepNum=Customer.RepNum
AND CustomerNum= ' 282 '
;
In Access, the query for the SalesCust view appears in Figure 4-8.
Name of view
Fields from
the Customer
table
Fields from
the Rep table
FIGURE 4-8
Access query design of the SalesCust view
The datasheet for the SalesCust view appears in Figure 4-9.
Search WWH ::




Custom Search