I have a table with a number field (non-null). I have another table with a varchar2 field. Examples:
Users UID,Name 123,Mickey 41128,Joe 43,Alice Groups UIDS,Name (123,43),Children (43),Admins (),Deleted
I want to join the two tables where the number column is "in" the varchar2 column. As you can see, the UIDS column has been developed to look like the syntax of an "in" join. However, the following does not work:
select * from users join groups where users.uid in groups.uids;
The number field cannot be in a string. I can cast the number field to a varchar 2 field, but it doesn't recognize the groups.uids column as a list of uids. It recognizes it as one value.
I believe that the next step I need to do is to strip the ( and ) from the uids value and then split it on the comma to create a list. Is that correct or is there a simpler way to merge these two tables?