I would like to extract each of the words in a string/value and print them as given below :-
WITH get_str
AS (SELECT 'Porter Care Adventist Health Systems DBA Littleton Adventist Hospital'
txt
FROM DUAL
UNION
SELECT 'Sample string for the query' txt FROM DUAL
UNION
SELECT 'Smith Carter Architects - Engineers, Inc. (US)' txt
FROM DUAL
UNION
SELECT 'Avenue of the Americas Development Company LLC.' txt
FROM DUAL)
SELECT *
FROM get_str
Expected output should be :-
String1 | String 2 | String 3 | String 4 | String 5 | String 6 | String 7 | String 8 | String 9 | TXT
|
---|
Porter | Care | Adventist | Health | Systes | DBA | Littleton | Adventist | Hospital | Porter Care Adventist Health Systems DBA Littleton Adventist Hospital |
Sample | String | for | the | query | | | | | Sample string for the query |
Smith | Carter | Architects | - | Engineers, | Inc. | (US) | | | Smith Carter Architects - Engineers, Inc. (US) |
Avenue | of | the | Americas | Development | Company | LLC | | | Avenue of the Americas Development Company LLC. |