?
Solved

Problem with inner join

Posted on 2015-02-02
2
Medium Priority
?
121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 2000 total points
ID: 40584764
"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
ID: 40584896
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 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