troubleshooting Question

SQL Issue with Join

Avatar of DJ P
DJ PFlag for United States of America asked on
6 Comments1 Solution18 ViewsLast Modified:
Hello experts. I have attached a document for illustration as well. You can see in the attachment my first query with multiple joins is working correctly and returning two test records per the parameters I gave it. The last table I want to join is a table called stock_quant. Below is the sql which returns two records that you can also see in my attachment. The problem I am having is when I attempt to join this last table instead of the two records getting added to my original two records, I get a ton of duplicated data. Hoping someone can take a look at give me the proper syntax in my join as to what I am missing. Thanks ahead of time from a newbietest_example.docxtest_example.docx

select * from stock_quant
where product_id = '15448'
and location_id in ('16', '28', 99)test_example.docx
Senior Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros