Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer-Join in Oracle

Re: Outer-Join in Oracle

From: codin p. <ProjectHipHop_at_gmail.com>
Date: 30 Sep 2004 14:50:27 -0700
Message-ID: <91306cc4.0409301350.6338a3f8@posting.google.com>


I would suggest trying to create a cursor first with the select statement. You might even ant to make a few cursor statements and combine them after the declaration. I would also suggest breaking the queries into IF THEN statements. Let me know if you cannot figure it out and I will help if you post code.

"Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:<odadnb4z7s4ybMbcRVn-gw_at_comcast.com>...
> "Christoph Graebener" <christoph.graebener_at_pronex.de> wrote in message
> news:7db947c0.0409291055.1d7ca7ac_at_posting.google.com...
> | Hallo together,
> |
> | I have to work out an sql-statement which was former runnning on an
> | Informix-Database. This has to be converted to the Oracle-Outer-Join
> | Syntax.
> |
> | My problem is that I have tried many different possibilites of
> | formulation the select-Statement, but without effort.
> |
> | Does anyone has an idea how to formulate the following
> | Select-Statement, which is according to the syntax-rules of an
> | informix-database, into a correct working Oracle-Statement?
> |
> | SELECT vbet.kname, vbet.stell, ladvb.alad, ladvb.vbschl, vbet.kenn,
> | vbet.lskenn,
> | vbet.zuord, vbet.schl, vbet.sort, ladvb.schl, ladvb.termschl,
> | ladvb.dlad,
> | ladvb.zlad, ladvb.alad, ladvb.bstlad, vbet.kuerz
> | FROM vbet, outer ladvb
> | WHERE vbet.vfschl = :gvnSchlüsselVerf
> | AND ladvb.vfschl = :gvnSchlüsselVerf
> | AND ladvb.termschl = :gvnSchlüsselEinzeltermine
> | AND ladvb.vbschl = vbet.schl
> | AND ladvb.dlad = (SELECT MAX (dlad)
> | FROM ladvb
> | WHERE ladvb.vbschl = vbet.schl
> | AND ladvb.termschl =
> | :gvnSchlüsselEinzeltermine)
> | AND (ladvb.zlad = (SELECT MAX (zlad) FROM
> | ladvb
> | WHERE ladvb.vbschl = vbet.schl
> | AND ladvb.termschl =
> | :gvnSchlüsselEinzeltermine
> | AND (ladvb.dlad = (SELECT MAX (dlad)
> | FROM ladvb
> | WHERE ladvb.vbschl =
> |
> | vbet.schl
> | AND ladvb.termschl =
> |
> | :gvnSchlüsselEinzeltermine))))
> | AND ladvb.schl = (SELECT MAX
> | (ladvb.schl) from ladvb
> | WHERE ladvb.vbschl =
> | vbet.schl AND
> | ladvb.termschl =
> | :gvnSchlüsselEinzeltermine)
> | ORDER BY sort
> |
> | Thanks for any help in advance.
> |
> | Christoph
>
> what version of oracle?
> what have you tried?
> what results (errors) did you get?
>
> ++ mcs
Received on Thu Sep 30 2004 - 16:50:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US