-1

I have data like this "1,2,3,4" (String). I need to convert this to ('1','2','3','4'), so that i can use like select * from table where ids in ('1','2','3','4').

Is there any in built function in vertica to convert string to comma separated array..? Thanks in advance.

  • Try the text index functionality. Otherwise, convert the string to a table and perform a join. Your method is not efficient. – Kermit Mar 30 '16 at 14:05

1 Answers1

0

Use the below method ( on vertia 7.1.X) :

select * from mytable  where id  in (select words  from (
select TxtIndex.StringTokenizerDelim('1,2,3,4,5,19 ',',') over () from dual 
) as aa ) 
elirevach
  • 404
  • 2
  • 7