1

I work with media storage for which there is a video table that has timecode values stored as a comma separated string in a var char column. I'm trying to find results where there instances of the same timecode appearing twice in the same value

For example, i want to be able to use a LIKE operator to retrieve anything that follows this pattern

COLUMN Timecode
VALUE '00:00:10;00,00:00:10;00'

basically if values are anything like 'A,A,B' or 'A,B,B' etc I'm trying to query for that.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
RyanVega
  • 11
  • 1
  • 1
    Which database/version? – Utsav Apr 01 '17 at 02:23
  • You shouldn't be storing comma separated values in the first place. If that was a properly normalized model, the query would be very easy. Having said that, in Postgres you could do that with`string_to_array()` and `unnest()` –  Apr 01 '17 at 06:50

0 Answers0