Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2004, 12:32 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Two outer joins

I have a problem with outer joins. Hope some one can help me.
the query:

select isNull(B.ID, -1), isNull(C.ID, -1), A.name from tbl_employee as A left outer join tbl_department as B on A.depID = B.depID left outer join tbl_room as C on A.roomID = C.roomID


The problem is when the join on table B as well as the join on table C 'works' I get two rows returned.

I only want one row.
Hope some one can help, Thanx, Neil
 
Old March 22nd, 2004, 01:09 PM
Registered User
 
Join Date: Mar 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My mistake,

The query I posted doesn't seem to have the same problem. I'm working with a large query so I quess I made a mistake some where else.

Thanx, anyway,
Neil






Similar Threads
Thread Thread Starter Forum Replies Last Post
CR XI left outer joins not working saied80 Crystal Reports 0 January 17th, 2007 12:41 PM
left outer join keyvanjan Classic ASP Professional 0 February 5th, 2006 11:54 AM
Outer Join, 2 columns jking SQL Language 1 December 5th, 2004 04:14 AM
outer join on same table roog SQL Language 4 September 30th, 2004 05:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.