Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 Using the WideWorldDistributors database and the Sales schema create a function that takes InvoiceID as an input parameter and returns all the rows

Part 1 Using the WideWorldDistributors database and the Sales schema create a function that takes InvoiceID as an input parameter and returns all the rows from the table InvoiceLines for the InvoiceID value passed into the function. If the result is a NULL return a zero. Take a screen shot of the SQL windows and results and paste it here.

Part 2 Using the WideWorldDistributors database and the Sales schema write a query that returns InvoiceID, InvoiceDate and CustomerPurchaseOrderNumber from the table Invoices and the result of the above created function. Take a screen shot of the SQL windows and results and paste it here.

Part 3 Using the AdventureWorks database and the Production schema create a function that takes ProductId as an input parameter and returns the results of a query that retrieves ProductID, Name, Color, Weight, and DaysToManufacgture from the table Product. Take a screen shot of the SQL windows and results and paste it here

Part 4 Using the AdventureWorks database and the Production schema write a query that returns the results of the function in Part 3 for ProductID 320. Take a screen shot of the SQL windows and results and paste it here.

Part 5 Using the AdventureWorks database and the Production schema write a query that returns the results of the function in Part 3 for ProductID 15. Take a screen shot of the SQL windows and results and paste it here.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions