Solved

Problem with inner join

Posted on 2015-02-02
2
104 Views
Last Modified: 2015-02-02
I have a query that reads:
$SqlString1 = "SELECT d.SEQ,d.BNMB,d.STRT,b.OWNCDE
                  FROM survey_data d
                  INNER JOIN bld2 b
                  ON d.SEQ = b.SEQ
                  WHERE d.SEQ = 'NY1035000575'";

It returns an error message that the "Query returned nothing".
If I delete the "b.OWNCDE" on the select, it works.

I know that there is an id in both "survey_data" and "bld2" that match.

What am I doing wrong?

Glenn
0
Comment
Question by:breeze351
2 Comments
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 500 total points
Comment Utility
"Query returned nothing" is not a MySQL error.  I'm guessing that something else is reporting that and masking an actual MySQL error.

Are you quite sure OWNCDE is the correctly spelled name and it belongs to table bld2?
0
 

Author Closing Comment

by:breeze351
Comment Utility
Thanks!!!
Can I kill my partner now.  The variable is a code for the owner.  He e-mailed me that it was "OWNCDE", which makes sense.  It's not!!!!  It's "OWCDE".

Thanks again
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now