I have table with 3 rows in example:
|-Id-||--props--|
1 aa = black
2 aa = change
d = eexplore
3 xxx = yield
d = int
mmmm = no
I want to write SQL statement with results:
aa
d
xxx
mmm
I.e. output all first elements in pairs x=y. The pairs in each row of given table could be separated by newline
.
I've tried the following SQL but the results are doesn't correct
SELECT REGEXP_SUBSTR ('a = b, b = c',
'[^=]',
1,
LEVEL) as name
FROM DUAL
CONNECT BY LEVEL <= (SELECT REGEXP_COUNT ('a = b, b = c', '=') FROM DUAL)