Here's my problem, but first, some relevant info. Here's my first table (SER_CONTEST):
ID TYPE_OF_USER
51 SER_JOB_TYPE_PROMOTER
69 SER_JOB_TYPE_KITCHEN_STAFF:SER_JOB_TYPE_PROMOTER
46 -
Here's my second table (SER_ENITY_USER):
ID INTERESTED_POSITIONS
141 SER_JOB_TYPE_BARBACK/BUSSER/RUNNER
Here's my query:
SELECT UNIQUE SER_CONTEST.ID
FROM SER_CONTEST, SER_ENITY_USER
WHERE DRAWING_POINT >= SYSDATE AND
(SER_CONTEST.TYPE_OF_USER LIKE SER_ENITY_USER.INTERESTED_POSITIONS || '%' OR SER_ENITY_USER.INTERESTED_POSITIONS LIKE SER_CONTEST.TYPE_OF_USER || '%' )
This query is pulling back 2 records (contest ID's of 51 and 69) with the current data in the tables, even though it should pull back 0 records for this particular query. Only when I change my second table (SER_ENITY_USER) to this should it pull back 2 records:
ID INTERESTED_POSITIONS
141 SER_JOB_TYPE_PROMOTER
Is there a typo on my part? I'm not sure why it's not working. I tried various combinations of wildcards and even using the soundex() function, but none of them work (I'm guessing soundex() isn't working because each db entry starts with "SER_JOB_TYPE_". Any thoughts? Thanks in advance!!!