I have a mySQL database where I want to take values(field1) from one table(tableA) and values(Field 2) from another table(tableB) then compare them. If Field 1 from table A is found in tableB Field 2 it should exclude them in my selection.
SELECT task_name, tasks.task_id
FROM tasks
INNER JOIN custom_fields_values ON value_object_id <>task_id
This is what I have tried but it doesn’t seem to work. It displays the task_id in triplicate, which is odd. Value_object_id has only two fields 24, and 32. task_id has numbers 1-40, basically I need a list of 1-40 without field value 24 and 32.
SELECT task_name, tasks.task_id
FROM tasks
INNER JOIN custom_fields_values ON value_object_id =task_id
This however works fine.
It’s because you’re using an
INNER JOIN— try using aLEFT JOINinstead.Good luck.