In the CUSTOMERS table, the CUST_CITY column contains the value ‘Paris’ for the
CUST_FIRST_NAME ‘ABIGAIL’.
Evaluate the following query:
SQL> SELECT INITCAP(cust_first_name ‘ ‘
UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2)))
FROM customers
WHERE cust_first_name = ‘ABIGAIL’;
What would be the outcome?
A.
Abigail PA
B.
Abigail Pa
C.
Abigail IS
D.
an error message
Why is not A??
Test case
with customers as(
select ‘Paris’ as CUST_CITY, ‘ABIGAIL’ as CUST_FIRST_NAME from dual
)SELECT INITCAP(cust_first_name||’ ‘||UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2)))
FROM customers
WHERE cust_first_name = ‘ABIGAIL’;
answer:Abigail Pa this is B
A not because is Initcap used for whole string, i.e. Initcap (cust_first_name concatenated with 2 characters from cust_city)
I forgot to add: there is a space between cust_first_name and cust_city.
Question is not true.it should like
SELECT INITCAP(cust_first_name || ‘ ‘ ||
UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2)))
FROM customers
WHERE cust_first_name = ‘ABIGAIL’;
and there should be space between comma.
Yes you are right. So it should be D if we run above command exactly without adding ||
So which option is the correct answer? Can someone plz help
Here is a good Blog You might Find Fascinating that we encourage you to visit.
here are some hyperlinks to internet sites that we link to because we consider they may be worth visiting
Usually posts some incredibly fascinating stuff like this. If you are new to this site.
Below youll uncover the link to some web-sites that we feel you must visit.
we came across a cool internet site that you may get pleasure from. Take a search in case you want
one of our guests not too long ago suggested the following website
Very informative blog.Much thanks again.
https://kitchenaid710.wordpress.com
Thanks-a-mundo for the blog.Really thank you! Cool.
http://artgerm.deviantart.com/art/Courage-of-Samurai-201276812
Major thanks for the post.Really thank you! Great.
hpslo.com
I think this is a real great article.Really looking forward to read more. Much obliged.