Which approach should you use?

Your application contains a stored procedure for each country. Each stored procedure accepts an
employee identification number through the @EmplD parameter.
You need to build a single process for each employee that will execute the appropriate stored
procedure based on the country of residence.
Which approach should you use?

Your application contains a stored procedure for each country. Each stored procedure accepts an
employee identification number through the @EmplD parameter.
You need to build a single process for each employee that will execute the appropriate stored
procedure based on the country of residence.
Which approach should you use?

A.
A SELECT statement that includes CASE

B.
Cursor

C.
BULK INSERT

D.
View

E.
A user-defined function

Explanation:
SQL Server user-defined functions are routines that accept parameters, perform an action, such as a
complex calculation, and return the result of that action as a value. The return value can either be a
single scalar value or a result set.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


JosefTheGreat

JosefTheGreat

Cannot call stored prodecures from UDF! :/ Cursor? WTF MS is totally crazy. mommy…

HR_OS_B

HR_OS_B

Yas, cursor with IF clause

Manuel

Manuel

I think it’s B !!