[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem with inner join

Posted on 2015-02-02
2
Medium Priority
?
125 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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…

656 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