exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 2 question 8 discussion

Actual exam question from Microsoft's DP-203
Question #: 8
Topic #: 2
[All DP-203 Questions]

DRAG DROP -
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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: CASE -
CASE evaluates a list of conditions and returns one of multiple possible result expressions.
CASE can be used in any statement or clause that allows a valid expression. For example, you can use CASE in statements such as SELECT, UPDATE,
DELETE and SET, and in clauses such as select_list, IN, WHERE, ORDER BY, and HAVING.
Syntax: Simple CASE expression:

CASE input_expression -
WHEN when_expression THEN result_expression [ ...n ]
[ ELSE else_result_expression ]

END -

Box 2: ELSE -
Reference:
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/case-transact-sql

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
MoDar
Highly Voted 3 years, 9 months ago
Correct
upvoted 43 times
...
[Removed]
Highly Voted 3 years, 9 months ago
The answer is correct. But, is this in the scope of this exam?
upvoted 9 times
f7c717f
6 months, 2 weeks ago
correct without reading the question as this is basic sql
upvoted 1 times
...
anto69
3 years, 5 months ago
it seems
upvoted 1 times
...
mkutts
3 years, 7 months ago
Got this question yesterday so yes.
upvoted 13 times
...
parwa
3 years, 9 months ago
make sense to me , data engineer should be able to write Queries
upvoted 11 times
...
...
606a82e
Most Recent 11 months ago
Correct
upvoted 1 times
...
kkk5566
1 year, 9 months ago
Correct
upvoted 1 times
...
Ankit_Az
2 years ago
Correct
upvoted 1 times
...
GodfreyMbizo
2 years, 4 months ago
they cant bring hard questions only for exam to balance
upvoted 1 times
...
DindaS
2 years, 4 months ago
yes the answer is correct but not sure if they will be included the DP-203 exam
upvoted 1 times
...
Igor85
2 years, 7 months ago
i wish all the questions in the exam were like that one :)
upvoted 6 times
...
Deeksha1234
2 years, 10 months ago
correct
upvoted 1 times
...
NewTuanAnh
3 years, 2 months ago
the answer is correct CASE ... WHEN ... THEN... ELSE ...
upvoted 2 times
...
PallaviPatel
3 years, 4 months ago
correct
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...