Sir can you help me regarding this query in SQL by using character functions only....
I/P : ABC DEF GHI
Output: ADG
Here's one way:
- Use initcap to lowercase all the characters except the first of each word
- Replace all the lowercases characters and space with null:
with rws as (
select 'ABC DEF GHI' s from dual
)
select regexp_replace(initcap(s), '([[:lower:]]| )')
from rws;
REGEXP_REPLACE(INITCAP(S),'([[:LOWER:]]|)')
ADG