Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8135761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:31:39+00:00 2026-06-06T10:31:39+00:00

I have several tables that I am selecting data from. I am trying to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:31:42+00:00Added an answer on June 6, 2026 at 10:31 am

    Use this instead

    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 interested_parties.emp_id IS NOT NULL 
    AND solicitation_entrys.sol_ent_id IS NOT NULL
    

    You have to compare each field for not being null.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several tables in my database that have read-only fields that get set
I have several tables that contain several strings for fields. Some of these fields
Here's the setup: I have several tables that hold information for data objects which
I have several database tables that have data that is for display purposes only,
I have a data-upload function that load some data into several tables and processes
I have several tables that get JOINed together to form a table with columns
I'm using Castle ActiveRecord in a warehouse project. I have several tables that get
I have several fields in some of my database tables that my CakePHP models
I have several tables from which I need to display data. Schools ------- id
I have several tables that I want to put side by side, however when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.