Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Server > SQL question on...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 16537 of 16860
Post > Topic >>

SQL question on an outer join

by fergus_vr01@[EMAIL PROTECTED] May 9, 2008 at 08:40 PM

Hello,
 Learning SQL - will appreciate any help.
 Here is the case:

Two tables with 0..n relation****p
TableA                  TableB
-----------             --------------
ColA                    ColB
                           ColA_FK
                           Col_C

Data
TableA.ColA
====================
 1
 2

Table B
ColB   ColA_FK    Col_C
 11      2              12345
 12      2              99999

 Resultset:

 --------------------------------------
 ColA   ColB      Col_C
 --------------------------------------
 1       -        -
 2       12       99999

 In case no data exists in TableB for ColA=11,  1 from TableA shows up
in result without any data from TableB
 However, in case of 2 from ColA,  we want to record from TableB with
Col_C = 99999

I can do the outer join - however, how do I limit it so it picks only
the row with 9999?

Thanks in advance.
Fergus
 




 7 Posts in Topic:
SQL question on an outer join
fergus_vr01@[EMAIL PROTEC  2008-05-09 20:40:53 
Re: SQL question on an outer join
Pat <pat.casey@[EMAIL   2008-05-09 22:18:55 
Re: SQL question on an outer join
fergus <fergus_vr01@[E  2008-05-10 09:02:53 
Re: SQL question on an outer join
Charles Hooper <hooper  2008-05-10 09:21:37 
Re: SQL question on an outer join
fergus <fergus_vr01@[E  2008-05-10 21:07:00 
Re: SQL question on an outer join
Charles Hooper <hooper  2008-05-11 06:05:01 
Re: SQL question on an outer join
fergus <fergus_vr01@[E  2008-05-11 13:59:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 17:56:00 CDT 2008.