?
Solved

sql server, database

Posted on 2011-09-07
3
Medium Priority
?
221 Views
Last Modified: 2012-05-12
I need to join 3 tables A, B, C  inner join A and B on ID and some other conditions. Then the result should be joined with C on the same id . but with C its a left outer join on the id. any suggestions?
0
Comment
Question by:singsunn
[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
3 Comments
 
LVL 41

Expert Comment

by:Sharath
ID: 36497771

try this.
select *
  from A
  join B on A.id = B.id -- add your other conditions
  left join C on A.id = C.id

Open in new window

0
 
LVL 57

Expert Comment

by:HainKurt
ID: 36497953
maybe this

select * from
(
select a.*, b.some other columns from a inner join b on a.id=b.id and ...
) x left join c on x.id=c.id
0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 2000 total points
ID: 36499843

select *
from A
inner join B on A.id = B.id
left join C on C.id = B.id
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

770 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