Valid 1Z0-051 Dumps shared by ExamDiscuss.com for Helping Passing 1Z0-051 Exam! ExamDiscuss.com now offer the newest 1Z0-051 exam dumps, the ExamDiscuss.com 1Z0-051 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1Z0-051 dumps with Test Engine here:
View the Exhibit and examine the structure of the EMPLOYEES table. Examine the data in the ENAME and HIREDATE columns of the EMPLOYEES table: ENAME HIREDATE ---------------------------------- SMITH 17-DEC-80 ALLEN 20-FEB-81 WARD 22-FEB-81 You want to generate a list of user IDs as follows: USERID ------------- Smi17DEC80 All20FEB81 War22FEB81 You issue the following query: SQL>SELECT CONCAT(SUBSTR(INITCAP(ename),1,3), REPLACE(hiredate,'-')) "USERID" FROM employees; What is the outcome?
Correct Answer: A
Explanation/Reference: Explanation: REPLACE(text, search_string,replacement_string) Searches a text expression for a character string and, if found, replaces it with a specified replacement string The REPLACE Function The REPLACE function replaces all occurrences of a search item in a source string with a replacement term and returns the modified source string. If the length of the replacement term is different from that of the search item, then the lengths of the returned and source strings will be different. If the search string is not found, the source string is returned unchanged. Numeric and date literals and expressions are evaluated before being implicitly cast as characters when they occur as parameters to the REPLACE function. The REPLACE function takes three parameters, with the first two being mandatory. Its syntax is REPLACE (source string, search item, [replacement term]). If the replacement term parameter is omitted, each occurrence of the search item is removed from the source string. In other words, the search item is replaced by an empty string. . The following queries illustrate the REPLACE function with numeric and date expressions: Query 1: select replace(10000-3,'9','85') from dual Query 2: select replace(sysdate, 'DEC','NOV') from dual