Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 22nd, 2004, 12:32 PM
Registered User
Join Date: Mar 2004
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old March 22nd, 2004, 01:09 PM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

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,

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.