Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Combine 3 Select to view
Duke wrote:
> On May 15, 11:38 am, DA Morgan <damor..._at_psoug.org> wrote: >> Duke wrote: >>> On May 14, 8:00 pm, DA Morgan <damor..._at_psoug.org> wrote: >>>> Duke wrote:
>>>> No version information. >>>> No error message. >>>> No help. >>>> That said ... likely the problem is the multiple outer joins. >>>> You should look at using in-line views or ANSI syntax. >>>> -- >>>> Daniel A. Morgan >>>> University of Washington >>>> damor..._at_x.washington.edu >>>> (replace x with u to respond) >>>> Puget Sound Oracle Users Groupwww.psoug.org-Hide quoted text - >>>> - Show quoted text - >>>> No version information. >>> 10gR2 - but for this SQL, I'm not sure it matters >> It does. You can't use ANSI syntax in 8i and earlier releases. >> >> >> No error message. >> >>> Correct >> Then no help. >> >>>> No help. >>> That's what I'm asking for. >> Well if you can't post an example with the problem you are having >> how do you expect us to help you? Write your code for you? >> >>>> likely the problem is the multiple outer joins. >>> I'm sure that's the problem. My question is how to get the three >>> separate queries into a view without duplicate info. >> I already answered that ... ANSI syntax or using in-line views. >> >>> I have no idea about in-line views or ANSI syntax. >> You will find demos of all of these matters atwww.psoug.orgin >> Morgan's Library. Look up "joins" and "inline views." >> >> Also go to your DBA and ask for help. Additionally go to amazon.com or >> your local bookstore and purchase all of Tom Kyte's books. >> -- >> Daniel A. Morgan >> University of Washington >> damor..._at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text - >> >> - Show quoted text - > > If anyone cares - here is the solution: > > Create VIEW RC_SEARCH AS > SELECT DEPARTMENT, REPORT_CODE, DESCRIPTION, 'CORE' SOURCE > FROM MSR_RC_CORE > UNION > SELECT DEPARTMENT, REPORT_CODE, DESCRIPTION, 'CAUSE' SOURCE > FROM MSR_RC_CAUSE > UNION > SELECT DEPARTMENT, REPORT_CODE, DESCRIPTION, 'RESOLUTION' SOURCE > FROM MSR_RC_RESOLUTION > / > No join, no ASCII syntax or whatever that is anyway, and actually this > is much faster and works great. > > Mark
And just throw away the outer joins such as:
"WHERE DEP.DEPARTMENT = RC1.DEPARTMENT(+)" Where did you read that into the spec?
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu May 17 2007 - 21:01:07 CDT
![]() |
![]() |