What would be the outcome? In the customers table, the CUST_CITY column contains the value ‘Paris’ for theCUST_FIRST_NAME ‘Abigail’. Evaluate the following query: What would be the outcome? In the customers table, the CUST_CITY column contains the value ‘Paris’ for theCUST_FIRST_NAME ‘Abigail’. Evaluate the following query: What would be the outcome? A.Abigail PA B.Abigail Pa C.Abigail IS D.An error message Explanation: Show Hint ← Previous question Next question →
Marcelo The catch this issue is to use UPPER together with INITCAP function, however INITCAP preceding UPPER. Reply Lima Eduardo select initcap(‘Abigail’||’ ‘||upper(substr(‘Paris’,-length(‘Paris’),2)))as result from dual RESULT ========== Abigail Pa Read 1 rows Reply
Lima Eduardo select initcap(‘Abigail’||’ ‘||upper(substr(‘Paris’,-length(‘Paris’),2)))as result from dual RESULT ========== Abigail Pa Read 1 rows Reply
Eduardo Lima select initcap(‘Abigail’||’ ‘||upper(substr(‘Paris’,-length(‘Paris’),2)))as result from dual RESULT ========== Abigail Pa Read 1 rows Reply
Sayed The INITCAP() function creates the whole expression first letter capital although the UPPER() initially made Paris to PA. So B is right Reply
shine Why is option C) not the answer? Since,its ‘-Length’, it should start from the end of the word ‘Paris’ and take the last 2 alphabets, i.e. ‘is’ Reply karan -Length(‘Paris”) = -5 = 5th character from last. (‘Paris’,-5,2) = P is the 5th character from last character and 2 char to be selected = Pa Reply
karan -Length(‘Paris”) = -5 = 5th character from last. (‘Paris’,-5,2) = P is the 5th character from last character and 2 char to be selected = Pa Reply
Amit Hi Guys, I’m doing preparation for Oracle Database 12c: sql fundamentals, so i have need some dump copies for it. if you guys have any idea about Oracle Databse 12c: sql fundamentals then please send me at [email protected] .. Thanks, Amit Reply
The catch this issue is to use UPPER together with INITCAP function, however INITCAP preceding UPPER.
select initcap(‘Abigail’||’ ‘||upper(substr(‘Paris’,-length(‘Paris’),2)))as result from dual
RESULT
==========
Abigail Pa
Read 1 rows
select initcap(‘Abigail’||’ ‘||upper(substr(‘Paris’,-length(‘Paris’),2)))as result from dual
RESULT
==========
Abigail Pa
Read 1 rows
The INITCAP() function creates the whole expression first letter capital although the UPPER() initially made Paris to PA.
So B is right
Why is option C) not the answer?
Since,its ‘-Length’, it should start from the end of the word ‘Paris’ and take the last 2 alphabets, i.e. ‘is’
-Length(‘Paris”) = -5 = 5th character from last.
(‘Paris’,-5,2) = P is the 5th character from last character and 2 char to be selected = Pa
Hi Guys,
I’m doing preparation for Oracle Database 12c: sql fundamentals, so i have need some dump copies for it. if you guys have any idea about Oracle Databse 12c: sql fundamentals then please send me at [email protected] ..
Thanks,
Amit