By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
select * from V$VERSION;
BANNER |
---|
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production |
PL/SQL Release 11.2.0.2.0 - Production |
CORE 11.2.0.2.0 Production |
TNS for Linux: Version 11.2.0.2.0 - Production |
NLSRTL Version 11.2.0.2.0 - Production |
select INSTR(SUBSTR(company,1,32),' ',-1) from
(select 'Some Random Very Long Comapany Name Co. Ltd.' as company from dual)
INSTR(SUBSTR(COMPANY,1,32),'',-1) |
---|
31 |
select
SUBSTR(company,1,
INSTR(SUBSTR(company,1,32),' ',-1)
) as first32,
SUBSTR(company,
INSTR(SUBSTR(company,1,32),' ',-1)
) as first32
from
(select 'Some Random Very Long Comapany Name Co. Ltd.' as company from dual)
FIRST32 | FIRST32 |
---|---|
Some Random Very Long Comapany | Name Co. Ltd. |