This is kind of hard to describe, but I have a database table with field A that may contain a string, say "AB12345". I have another database table with field B that contains a string "12345,6789034,54637".
I need to figure out how to write a where clause such that the row of data with the value of "AB12345" in column A is returned when any of the 3 comma separated values stored field B match.
So, basiclly
WHERE A LIKE '%12345%'
OR A LIKE '%6789034%'
OR A LIKE '%54637%'
but I can't write it like above because the value of B is dynamic. The value of B could be "1234524" or "34567,239824" or "12340,512346,623462112" or an combination list of possible numbers.
Anyone have any ideas? I think this is going to require regular expressions, but I'm not sure it's doable.
Thanks,
Kris