I have several tables that I am selecting data from. I am trying to get a list of information out of these tables only where the fields
“interested_parties.emp_id” and “solicitation_entrys.sol_ent_id” are satisfied.
This is my query that I have come up with so far:
SELECT * FROM users
JOIN interested_parties ON (users.emp_id = interested_parties.emp_id)
JOIN department_colors ON (department_colors.dept_id = users.emp_dept)
JOIN solicitation_entrys ON (solicitation_entrys.sol_ent_id = interested_parties.sol_ent_id)
WHERE IS NOT NULL (interested_parties.emp_id, solicitation_entrys.sol_ent_id)
The goal is to select everything from these tables, where these fields are not null.
I’m getting #1064 errors from MySQL and I can’t seem to solve the issue. Do I have to perform the if at the beginning of the select? If so, how would you do that with joins?
Thank you for your help.
Use this instead
You have to compare each field for not being null.