Appendix E – Advanced SQL
2. Create an SQL view named CustomerFirstNameFirstSeminarView that shows
CUSTOMER.CustomerID, then LastName and FirstName concatenated using
the FirstNameFirst user-defined function and displayed as CustomerName,
EmailAddress, City, State, ZIP, SeminarDate, Location, and SeminarTitle.
Note that the syntax for function calls varies from one DBMS to another. For SQL
Server:
CREATE VIEW CustomerFirstNameFirstSeminarView AS
SELECT C.CustomerID,
dbo.FirstNameFirst(FirstName, LastName) AS CustomerName,
For Oracle (shorter identifiers required; no “dbo.” syntax required):
CREATE VIEW CustFirstNameFirstSeminarView AS
3. Create an SQL view named CustomerProductView that shows
CUSTOMER.CustomerID, LastName, FirstName, EmailAddress,
INVOICE.InvoiceNumber, InvoiceDate, PRODUCT.ProductNumber, and
ProductDescription.
For Microsoft Access:
Create and save the following Access query as viewCustomerProduct.