nerdexam
Microsoft

DP-203 · Question #148

Drag and Drop Question You have the following table named Employees. You need to calculate the employee_type value based on the hire_date value. How should you complete the Transact-SQL statement?…

The correct answer is CASE; ELSE. The CASE expression is the correct T-SQL construct for implementing conditional logic to derive the employee_type value based on hire_date, using WHEN/THEN clauses to evaluate conditions. The ELSE keyword is required as the final clause in a CASE expression to handle any rows…

Submitted by parkjh· Mar 30, 2026Write Transact-SQL queries - specifically using conditional expressions (CASE/ELSE) to derive computed column values based on existing data, typically mapped to the 'Query Data Using T-SQL' or 'Implement Programmatic T-SQL Constructs' domain in Microsoft SQL/DP-900/70-761 certifications.

Question

Drag and Drop Question You have the following table named Employees. You need to calculate the employee_type value based on the hire_date value. How should you complete the Transact-SQL statement? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Exhibit

DP-203 question #148 exhibit

Answer Area

Drag items

CASEELSEOVERPARTITION BYROW_NUMBER

Correct arrangement

  • CASE
  • ELSE

Explanation

The CASE expression is the correct T-SQL construct for implementing conditional logic to derive the employee_type value based on hire_date, using WHEN/THEN clauses to evaluate conditions. The ELSE keyword is required as the final clause in a CASE expression to handle any rows that don't match the preceding WHEN conditions, providing a default value. Together, CASE...WHEN...THEN...ELSE...END forms the complete conditional expression needed to categorize employees based on their hire date.

Topics

#CASE Expression#Conditional Logic#T-SQL#Data Transformation

Community Discussion

No community discussion yet for this question.

Full DP-203 Practice