Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use this link to download the database: https://drive.google.com/drive/folders/11FLfdYZUbIDxLuifwLcZfb9sMxGBnPiI Part 2 Multi-Statement Table-Valued UDF Create a multi-statement table-valued UDF in the InsideTSQL2008 database . The

Please use this link to download the database:

https://drive.google.com/drive/folders/11FLfdYZUbIDxLuifwLcZfb9sMxGBnPiI

Part 2 Multi-Statement Table-Valued UDF

Create a multi-statement table-valued UDF in the InsideTSQL2008 database. The function should take a City, NVARCHAR(15), as a parameter and return a list of employees in that city per the HR.Employees table. The result table should have three columns, LastName, FirstName and Title with their datatypes identical to the HR.Employees table. If there are no employees in that city specified by the argument then the LastName column should contain No Employees, and the FirstName should contain the value of the argument and the Title should be null.

Here are the two examples of output:

image text in transcribedimage text in transcribed

SELECTFROM dbo. EmpInCity('Kirkland') 100 % Results Messages Last Name First NameTitle 1 Lew Judy Sales Manager SELECTFROM dbo. EmpInCity('Kirkland') 100 % Results Messages Last Name First NameTitle 1 Lew Judy Sales Manager

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago