New Updated 70-461 Exam Questions from PassLeader 70-461 PDF dumps! Welcome to download the newest PassLeader 70-461 VCE dumps: http://www.passleader.com/70-461.html (168 Q&As)
Keywords: 70-461 exam dumps, 70-461 exam questions, 70-461 VCE dumps, 70-461 PDF dumps, 70-461 practice tests, 70-461 study guide, 70-461 braindumps, Querying Microsoft SQL Server 2012 Exam
NEW QUESTION 158
You have a Microsoft SQL Server database that includes two tables named EmployeeBonus and BonusParameters. The tables are defined by using the following Transact-SQL statements:
The tables are used to compute a bonus for each employee. The EmployeeBonus table has a non- null value in either the Quarterly, HalfYearly or Yearly column. This value indicates which type of bonus an employee receives. The BonusParameters table contains one row for each calendar year that stores the amount of bonus money available and a company performance indicator for that year. You need to calculate a bonus for each employee at the end of a calendar year. Which Transact-SQL statement should you use?
A. SELECT
CAST(CHOOSE((Quarterly * AvailableBonus * CompanyPerformance)/40, (HalfYearly * AvailableBonus * CompanyPerformance)/20, (Yearly * AvailableBonus * CompanyPerformance)/10) AS money) AS `Bonus’ FROM
EmployeeBonus, BonusParameters
B. SELECT “Bonus” =
CASE EmployeeBonus
WHEN Quarterly=1 THEN (Quarterly * AvailableBonus * CompanyPerformance)/40 WHEN HalfYearly=1 THEN (HalfYearly * AvailableBonus * CompanyPerformance)/20 WHEN Yearly=1 THEN (Yearly * AvailableBonus * CompanyPerformance)/10 END
FROM EmployeeBonus,BonusParameters
C. SELECT
CAST(COALESCE((Quarterly * AvailableBonus * CompanyPerformance)/40, (HalfYearly * AvailableBonus * CompanyPerformance)/20, (Yearly * AvailableBonus * CompanyPerformance)/10) AS money) AS `Bonus’ FROM
EmployeeBonus, BonusParameters
D. SELECT
NULLIF(NULLIF((Quarterly * AvailableBonus * CompanyPerformance)/40,(HalfYearly * AvailableBonus * CompanyPerformance)/20),
(Yearly * AvailableBonus * CompanyPerformance)/10) AS `Bonus’ FROM
EmployeeBonus, BonusParameters