Selecting rows based on values in one of its semi-colon delimited columns: PL/SQL

Viewed 49

I'm currently trying to select all rows where a certain ID exists within that rows semi-colon delimited ID column.

The Table:

=====================
 TOOL_ID | TOOL_USERS
---------------------
    1        1;2;3
    2        1;3
    3        1
=====================

I want to select all the tools that a certain user has access to, for example, the desired result where the user ID is 3:

TOOL_ID | TOOL_USERS
---------------------
    1        1;2;3
    2        1;3

I know that this design is not normalized, but I do not have the ability to change/modify the database. I could always just query all of the rows and then loop through the results deleting any that don't contain the user id, but I'd rather do this is one nice, clean query.

Is this possible? Thanks.

1 Answers
Related