Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP, any help is appreciated. Thank you. Write a user-defined function named LastNameFirst that concatenates the customer's LastName and FirstName into a single value
PLEASE HELP, any help is appreciated. Thank you.
Write a user-defined function named LastNameFirst that concatenates the customer's LastName and FirstName into a single value named FullName, and displays, in order, the LastName, a comma, a space, and the FirstName (hint: Stanley and Elizabeth would be combined to read Stanley, Elizabeth) A. B. Create the following SQL view: Create an SQL view named CustomerPurchaseView that shows CustomerlD, LastName, FirstName, InvoiceNumber, Date, and PreTaxAmount. 2. Create an SQL view named CustomerLastNameFirstPurchaseView that shows CustomerlD, then LastName and FirstName concatenated using the LastNameFirst user- defined function and displayed as CustomerName, InvoiceNumber, Date, and PreTaxAmount. 3. Create an SQL view named PurchaseltemitemView that shows InvoiceNumber, ItemNumber, ArtistLastName, ArtistFirstName, Description, Cost, and RetailPrice. 4. Create an SQL view named PurchaseltemltemLastNameFirstView that shows InvoiceNumber, ItemNumber, then ArtistlastName and ArtistFirstName concatenated using the LastNameFirst user-defined function and displayed as ArtistName, Description, Cost, and RetailPrice. Write a user-defined function named LastNameFirst that concatenates the customer's LastName and FirstName into a single value named FullName, and displays, in order, the LastName, a comma, a space, and the FirstName (hint: Stanley and Elizabeth would be combined to read Stanley, Elizabeth) A. B. Create the following SQL view: Create an SQL view named CustomerPurchaseView that shows CustomerlD, LastName, FirstName, InvoiceNumber, Date, and PreTaxAmount. 2. Create an SQL view named CustomerLastNameFirstPurchaseView that shows CustomerlD, then LastName and FirstName concatenated using the LastNameFirst user- defined function and displayed as CustomerName, InvoiceNumber, Date, and PreTaxAmount. 3. Create an SQL view named PurchaseltemitemView that shows InvoiceNumber, ItemNumber, ArtistLastName, ArtistFirstName, Description, Cost, and RetailPrice. 4. Create an SQL view named PurchaseltemltemLastNameFirstView that shows InvoiceNumber, ItemNumber, then ArtistlastName and ArtistFirstName concatenated using the LastNameFirst user-defined function and displayed as ArtistName, Description, Cost, and RetailPriceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started