ANSWER:
Here you go, it works and does not throw exceptions even at the edge cases
select full_name,
TRIM(SUBSTR(full_name, INSTR(full_name,',')+1, LENGTH(full_name))) first_name,
TRIM(SUBSTR(full_name,1, INSTR(full_name,',')-1)) last_name
from
(
select 'Smith, Michael' as full_name from dual union all
select 'Smith ,Michael' as full_name from dual union all
select 'Smith , Michael' as full_name from dual union all
select 'Lopes, Jennifer' as full_name from dual union all
select 'Lopes, Jennifer' as full_name from dual union all
select 'Lopes Jennifer' as full_name from dual union all
select 'Lopes' as full_name from dual union all
select 'Jlo,' as full_name from dual union all
select ',Jlo' as full_name from dual union all
select '' as full_name from dual
)
Results:
