[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SELECT not returning data when Inner Joins doesn't!

Posted on 2007-10-15
4
Medium Priority
?
244 Views
Last Modified: 2010-03-19
When I have s SELECT with INNER JOINS and the INNER JOINS doesn't return any result the whole SELECT doesn't return any data, how can I avoid that?

Running SQL Server Compact Edition.
0
Comment
Question by:TYB
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 20076427
use LEFT or RIGHT join instead of INNER join.
0
 
LVL 10

Expert Comment

by:answer_me
ID: 20076435
Use Left joins insttead of inner join
0
 
LVL 7

Expert Comment

by:DiscoNova
ID: 20076437
Use another type of join (LEFT OUTER JOIN comes to mind as a suitable alternative).

For more information, check http://en.wikipedia.org/wiki/Join_%28SQL%29 ... (or any beginner-level SQL-manual)
0
 

Author Comment

by:TYB
ID: 20076485
Tnx for you help! LEFT JOIN did the trick for me!

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Suggested Courses

872 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