Sometimes we have to elaborate rows- results of a SELECT- in a way we cannot think to accomplish it with simple SQL code but we can be wrong ... SQL is pretty powerful. Let's take this case.
What we have:
|Customer 1||AA11, BB22, FF92|
|Customer 2||CC43, RR55|
What we need:
The LIST of products need to be splited- in different rows- according to the token comma ",". This results can be accomplished using Regular Expression function and Connect By statement. For example:
SELECT Customer, regexp_replace(Wishlist,'[^,]*') FROM Customers CONNECT BY LEVEL <= length(regexp_replace(Wishlist,'[^,]*'))+1