Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    105

    Unhappy Unanswered: Problems with a query

    hi all
    i have a sql query which worked with access but now i have problem with getting it to work with oracle
    thats what it was like in access

    select distinct tblA.a, tblB.a, tblB.b, tblA.b, tblA.c, tblRel.a, tlbRel.b
    FROM (((
    Select tblC.a As Ca, tblC.b As Cb
    From tblC

    UNION

    Select tblC.c as Ca, tblCd as Cb
    From tblC
    ) As Relation

    Left Join tblA ON Relation.Ca = tblA.b
    Left Join tblB ON tblA.a = tblB.c

    LEFT JOIN

    (Select ....


    now i tried to put that in oracle code but it seems it doesnt work when it comes to
    Select tblC.a As Ca, tblC.b As Cb
    From tblC

    UNION

    Select tblC.c as Ca, tblCd as Cb
    From tblC
    ) As Relation <- here i get errors i would need to name that like a table so that later on i can join the tables with Relation.Cb (+)= AnotherASRelation.Ca
    does something like that not work with oracle? or am i making a mistake here?
    and if its not working in oracle, are there other ways to do such a thing?

    thanks

  2. #2
    Join Date
    Oct 2004
    Posts
    105
    oh i found the reason i think, it works if i do it without the AS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •