Question: show a user-defined function named FirstNameFirst that concatenates the CustomerLastName and CustomerFirstName into a single value named CustomerName and displays, in order, the CustomerFirstName, space,
- show a user-defined function named FirstNameFirst that concatenates the CustomerLastName and CustomerFirstName into a single value named CustomerName and displays, in order, the CustomerFirstName, space, and the CustomerOwnerLastName (Hint: Johnson and Ariel would be combined to read Ariel Johnson).
- Code an SQL statement to make an view named CourseEnrollmentFirstNameFirstView that shows CourseNumber, Course, CourseDate, CustomerNumber, CustomerLastName and CustomerFirstName concatenated using the FirstNameFirst user-defined function and displayed as CustomerName, and Phone.
- Code an SQL statement that displays the data in CourseEnrollmentLastNameFirstView, sorted alphabetically by CustomerName and CourseNumber.
TABLES:
CUSTOMER (CustomerNumber (PK), CustomerLastName, CustomerFirstName, Phone)
COURSE (CourseNumber (PK), Course, CourseDate, Fee)
ENROLLMENT (CustomerNumber (PK,FK), CourseNumber(PK,FK), AmountPaid)
Here is a picture of what I have written for #1 and the errors I am seeing when trying to compile the code. I think I can figure out 2 and 3 once I get #1 properly working
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
