left join on, incl a where [message #280697] |
Wed, 14 November 2007 09:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ShinyPup
Messages: 2 Registered: November 2007 Location: Michigan
|
Junior Member |
|
|
![http://i2.photobucket.com/albums/y49/shinypuppy/SQL17.jpg](http://i2.photobucket.com/albums/y49/shinypuppy/SQL17.jpg)
I've though it was:
select b.book_code, b.title, i.on_hand
from book b
left join inventory i
on i.book_code = b.book_code
where i.branch_num = '2'
order by b.book_code;
But that only gets the 15 true results not the 47 total I want. Any thoughts?
|
|
|
|
Re: left join on, incl a where [message #281071 is a reply to message #280880] |
Thu, 15 November 2007 11:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ShinyPup
Messages: 2 Registered: November 2007 Location: Michigan
|
Junior Member |
|
|
As far as I know it is, as it is an Oracle class. As far as the script, I just used what the book company gave us. I figured it out though by adding join condition as part of the join on statement.
|
|
|
Re: left join on, incl a where [message #281092 is a reply to message #281071] |
Thu, 15 November 2007 12:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/43055.jpg) |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
It is valid Oracle SQL, that's right. Most people however would stick to NUMBER for numeric data types. I haven't seen much DECIMAL columns yet. It's not bad or anything, it's just not common.
MHE
|
|
|