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


Programming > Cobol > Re: ProCobol Ou...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 15 Topic 4108 of 4195
Post > Topic >>

Re: ProCobol Outer join

by jeff <jmoore207@[EMAIL PROTECTED] > May 8, 2008 at 07:40 AM

On May 8, 10:24=A0am, "Michael Mattias" <mmatt...@[EMAIL PROTECTED]
> wrote:
> "jeff" <jmoore...@[EMAIL PROTECTED]
> wrote in message
>
>
news:c06426f2-e7e7-428c-9350-b3343d6a612c@[EMAIL PROTECTED]
>
>
>
>
>
> >I am having a problem with a left outer join when I add conditionals.
>
> > Select
> > =A0 =A0 =A0 =A0A. vehicle,
> > =A0 =A0 =A0 =A0B.Vehicle,
> > =A0 =A0 =A0 =A0B.acct,
> > =A0 =A0 =A0 =A0B.MOYR,
> > =A0 =A0 =A0 =A0B.Trancode
> > from =A0Table1 A, Table2 B
> > where A.vehicle=3DB.vehicle(+)
> > =A0and =A0 B.acct=3D'1234'
> > =A0and =A0 B.MOYR =3D '0502'
> > =A0and =A0B.trancode=3D'80'
> > =A0order by a.vehicle
>
> > I need all a.vehicles for all vehicles to come back in the cursor
> > regardless. Any ideas?
>
> ALL A.vehicles?
>
> Then you can't us the conditionals that way, since that will omit any
> a.vehicles which don't have any rows in b matching the conditions.
>
> You can change your select to return a 'nvl' =A0(oracle) or 'nullif'
> (something) or CASE (I think that is standard) to return the rows where
th=
e
> "b" results set columns will be null and eliminate the WHEREs , but
there
> are others here who write SQL far far better than do I.
>
> MCM- Hide quoted text -
>
> - Show quoted text -

Yeah that was kind of an overview, I did use NVL for the B.Table
fields to account for nulls. Thanks for your help
 




 15 Posts in Topic:
ProCobol Outer join
jeff <jmoore207@[EMAIL  2008-05-08 06:58:32 
Re: ProCobol Outer join
"Michael Mattias&quo  2008-05-08 09:24:01 
Re: ProCobol Outer join
jeff <jmoore207@[EMAIL  2008-05-08 07:40:38 
Re: ProCobol Outer join
Robert Jones <rjones0@  2008-05-08 10:54:52 
Re: ProCobol Outer join
jeff <jmoore207@[EMAIL  2008-05-08 11:01:48 
Re: ProCobol Outer join
Robert Jones <rjones0@  2008-05-08 13:56:21 
Re: ProCobol Outer join
Robert <no@[EMAIL PROT  2008-05-08 18:36:04 
Re: ProCobol Outer join
Robert <no@[EMAIL PROT  2008-05-08 20:40:41 
Re: ProCobol Outer join
"Pete Dashwood"  2008-05-09 15:09:26 
Re: ProCobol Outer join
Robert <no@[EMAIL PROT  2008-05-08 20:48:29 
Re: ProCobol Outer join
"Pete Dashwood"  2008-05-09 15:11:11 
Re: ProCobol Outer join
Robert <no@[EMAIL PROT  2008-05-08 22:55:34 
Re: ProCobol Outer join
"Michael Mattias&quo  2008-05-09 08:17:58 
Re: ProCobol Outer join
"Pete Dashwood"  2008-05-10 12:57:31 
Re: ProCobol Outer join
Robert <no@[EMAIL PROT  2008-05-08 22:25:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 25 22:05:26 CDT 2008.