0

I have data with the following structure in redshift:

select 1 as id, 'a,b,c' as str
union all select 2, 'c,d'

I would like to convert str to a flat column, obtaining the following data:

1,a
1,b
1,c
2,c
2,d

How can I do that in redshift?

Thanks!

David Masip
  • 1,576
  • 15
  • 28
  • In addition to the duplicate link, you may poke around and see how to do it in Postgres, as Redshift is based off an old fork of Postgres, and some things still work the same. – Tim Biegeleisen May 05 '22 at 10:55

0 Answers0