with src as (
Select 'A202 A202' as str from dual union all
Select 'Flat A202 Flat' as str from dual union all
Select 'The Old The Old' as str from dual union all
Select 'The Old Millers The Old' as str from dual union all
Select 'The Old Millers The Old Millers' as str from dual union all
Select 'The Old Cottage Millers The Old' as str from dual union all
Select 'The Old Millers Cottage The Old Millers' as str from dual union all
Select 'The Old Millers Cottage Annex The Old' as str from dual union all
Select 'The Old Millers Cottage The Old Millers Cottage' as str from dual union all
Select 'The Old Millers Cottage Annex The Old Millers' as str from dual union all
Select 'The Old Cottage Wood Annex Hall The Old' as str from dual union all
Select 'The Old Millers Cottage Annex The Old Millers Cottage' as str from dual union all
Select 'The Old Millers Cottage Wood Annex The Old Millers' as str from dual union all
Select 'The Old Cottage Street Wood Annex Hall The Old' as str from dual union all
Select 'The Old Millers Cottage Annex The Old Millers Cottage Annex' as str from dual union all
Select 'The Old Millers Cottage Wood Annex The Old Millers Cottage' as str from dual union all
Select 'The Old Millers Cottage Wood Annex Hall The Old Millers' as str from dual union all
Select 'The Old Millers Cottage Street Wood Annex Hall The Old' as str from dual union all
Select 'The Old Millers Cottage Annex Hall The Old Millers Cottage Annex' as str from dual union all
Select 'The Old Millers Cottage Wood Annex Hall The Old Millers Cottage' as str from dual union all
Select 'The Old Millers Cottage Street Wood Annex Hall The Old Millers' as str from dual union all
Select 'The Old Millers Cottage Farm Street Wood Annex Hall The Old' as str from dual
)
select listagg(str,' ') within group(order by r) str
from
( select min(r) r, rn, str from
(
SELECT rownum r, rn,
REGEXP_SUBSTR (str, '[^ ]+',1,n) AS str
FROM (select rownum rn, str from src) src,
( SELECT LEVEL n
FROM DUAL,
(SELECT MAX (REGEXP_COUNT (str, ' ')) + 1 mcomma FROM src)
CONNECT BY LEVEL <= mcomma) ctr
WHERE ctr.n <= 1 + REGEXP_COUNT (str, ' ')
) group by rn, str) group by rn;