What would be the outcome?

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?

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



Leave a Reply 17

Your email address will not be published. Required fields are marked *


Ivan Ticona

Ivan Ticona

Why is not A??

OldBoyOdeSu

OldBoyOdeSu

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

Justyna

Justyna

A not because is Initcap used for whole string, i.e. Initcap (cust_first_name concatenated with 2 characters from cust_city)

Justyna

Justyna

I forgot to add: there is a space between cust_first_name and cust_city.

Shixali

Shixali

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.

Bharat

Bharat

Yes you are right. So it should be D if we run above command exactly without adding ||

Mayur

Mayur

So which option is the correct answer? Can someone plz help

Google

Google

Here is a good Blog You might Find Fascinating that we encourage you to visit.

useful source

useful source

here are some hyperlinks to internet sites that we link to because we consider they may be worth visiting

Google

Google

Usually posts some incredibly fascinating stuff like this. If you are new to this site.

Google

Google

Below youll uncover the link to some web-sites that we feel you must visit.

Pinganillos

Pinganillos

we came across a cool internet site that you may get pleasure from. Take a search in case you want

Jual Paket PLTS Terpusat atau Komunal Harga Terbaik

Jual Paket PLTS Terpusat atau Komunal Harga Terbaik

one of our guests not too long ago suggested the following website

Sex

Sex

Major thanks for the post.Really thank you! Great.

hpslo.com

Loris Parrin

Loris Parrin

I think this is a real great article.Really looking forward to read more. Much obliged.