How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)
Answer Posted / kunal
SELECT listagg(newstr) within GROUP (
ORDER BY rm)
FROM
(SELECT
CASE
WHEN SUBSTR('AbcdEfG',level,1)=upper(SUBSTR('AbcdEfG',level,1))
THEN lower(SUBSTR('AbcdEfG',level,1))
ELSE upper(SUBSTR('AbcdEfG',level,1))
END newstr,
rownum rm
FROM dual
CONNECT BY level <=LENGTH('AbcdEfG')
)
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is Materialized View? In What Scenario we Use Materialized View?
What is varray in pl sql?
What is benefit of creating memory optimized table?
What are two statement types in sql?
What does count (*) mean?
What are the ddl commands?
What is out parameter used for eventhough return statement can also be used in pl/sql?
What is a left join?
Is full outer join same as cross join?
Can ddl statements be used in pl/sql?
what is 'mysqlimport'? : Sql dba
what is the difference between union and union all? : Sql dba
What is online transaction processing (oltp)?
explain advantages of innodb over myisam. : Sql dba
What is the difference between clustered and non-clustered indexes?