Michael
Michael

Reputation: 321

Error when trying to lowercase columns in SQL Plus query

OK, I am using SQL Plus and I am trying to view the table and one of the columns I was to view in lower case. This shold be very easy but for some reason it is not work. The code I am using is

SELECT CUSTOMER_NUM, CUSTOMER_ADD (LOWER)CUSTOMER_FIRST, (UPPER)CUSTOMER_LAST
FROM CUSTOMER;

The error I am getting is ORA-00904: "CUSTOMER_LAST": invalid identifier

Upvotes: 1

Views: 1414

Answers (2)

DJ.
DJ.

Reputation: 6784

lower and upper is function call, and you also have a missing coma after CUSTOMER_ADD. proper sql should be

SELECT CUSTOMER_NUM, CUSTOMER_ADD, LOWER(CUSTOMER_FIRST), UPPER(CUSTOMER_LAST) FROM CUSTOMER;

Upvotes: 1

quip
quip

Reputation: 3694

Try lower(customer_first) and upper(customer_last)

Upvotes: 2

Related Questions