Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please download the AdventureWorks2012.bak from the following link: https://drive.google.com/drive/folders/1gfdFkHtUp-VVkhItKiVwkH9G70qP2hzA Question: 1. Create an empty database called AdventureWorks2012 2. Use the supplied .bak file named AdventureWorks2012.bak

Please download the AdventureWorks2012.bak from the following link:

https://drive.google.com/drive/folders/1gfdFkHtUp-VVkhItKiVwkH9G70qP2hzA

Question: 1. Create an empty database called AdventureWorks2012

2. Use the supplied .bak file named AdventureWorks2012.bak to restore the database.

3. Do not incorporate any USE statements in your solution

4. Include a DROP FUNCITON IF EXISTS statement for the UDF before the CREATE FUNCTION statement. Dont forget the GO statement.

5. Create a UDF called DBO.InventoryLevel

a. The UDF requires an integer as a product identifier as the first parameter

b. The UDF takes an optional integer as location specifier as the second parameter

c. The UDF returns the quantity of the specified product for the given location

d. If a null location specifier is provided, then return the quantity of the specified product for all locations

6. Ensure that changes to the underlying table(s) will not affect the UDF

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

More Books

Students also viewed these Databases questions

Question

=+is the product of the moment generating functions of X' and Y'.

Answered: 1 week ago