Saturday, May 5, 2018

Using UPPER, LOWER and INITCAP in PLSQL Query

https://randomsrsolutions.blogspot.com/2018/05/using-upper-lower-and-initcap-in-plsql.html

Converts Mixed Case or Lower Case Character strings to Uppercase
select  UPPER('Pakistan') from dual;
PAKISTAN

Converts Mixed Case or UpperCase Character strings to Lowercase
select LOWER('PAKISTAN') from dual;
pakistan

Converts the first letter of each Word to Uppercase and remaining Letters to Lowercase
select INITCAP('PAKISTAN') from dual;
Pakistan

--------------------------------------------------------------------------------------------------

select ENAME from EMP where ENAME = 'smith';
no rows returned

select ENAME from EMP where ENAME = UPPER('smith');
SMITH

select ENAME from EMP where LOWER(ENAME) = 'smith';
SMITH

select ENAME from EMP where UPPER(ENAME) = 'smith';
no rows returned

select ENAME from EMP where UPPER(ENAME) = UPPER('smith');
SMITH


No comments:

Post a Comment

XLA to GL Link

  https://plsqlquery.blogspot.com/2025/12/xla-to-gl-link.html SELECT             acr.cash_receipt_id,             acr.receipt_number,       ...