🎴 Flashcard Mode

SQL Server Administration & Database Concepts Quiz

Card1 / 20
Mastered0
Review0
QuestionClick to flip

KCRT_REQUEST_DETAILS Request_type_id Request_id Batch_No Visible_parameter41 Visible_parameter31 --------------- ----------- --------- ------------------- ------------------- 1 31300 1 Online (null) 1 31300 2 Batch (null) 1 31300 3 Manually (null) 2 31301 1 2010-03-17 11:55:00 99 2 31301 2 2009-11-09 14:00:00 55 2 31301 3 2010-05-27 11:55:00 789 3 31302 1 TCS ACCM1 3 31302 2 INFOSYS BAPP1 3 31302 3 CTS IT1 KCRT_REQUEST_TYPES Request_Type_Id Request_Type_Name --------------- ----------------- 1 AXA_RT_Application_Demand 2 AXA_RT_Application_Definition 3 AXA_RT_Support_Release The statement that converts the Visible_parameter41 in the format ‘17/03/10’ for Request_id = 31301 for batch No ‘1’?

AnswerClick to flip back
A
SELECT to_date(visible_parameter41,’yyyy-mm-dd hh24:mi:ss’) from KCRT_REQUEST_DETAILS where request_id = 31301 and batch_number = ‘1’;
💡 Explanation:

The visible_parameter41 contains '2010-03-17 11:55:00'. Option D uses TO_DATE with format 'yyyy-mm-dd hh24:mi:ss' which correctly matches this input format and converts it to a DATE type. Options A and C use TO_CHAR incorrectly (would return string, not date), and B lacks the required format mask.

Change Mode