• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

sql server, database

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
singsunn
Asked:
singsunn
1 Solution
 
SharathData EngineerCommented:

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
 
HainKurtSr. System AnalystCommented:
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
 
Ephraim WangoyaCommented:

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now