* Urgent - Access Query to Oracle SQL

Heyas,
Hoping some1 can convert this Access Query to its Oracle SQL Equivalent.
-------------
SELECT Clients.*, Administrators.Administrator, Products.[Product Code], Products.Product
FROM Products INNER JOIN (Administrators RIGHT JOIN Clients ON Administrators.AdministratorID = Clients.administratorID) ON Products.ProductID = Clients.ProductID;
------------

Thanks

Comments

  • : Heyas,
    : Hoping some1 can convert this Access Query to its Oracle SQL Equivalent.
    : -------------
    : SELECT Clients.*, Administrators.Administrator, Products.[Product Code], Products.Product
    : FROM Products INNER JOIN (Administrators RIGHT JOIN Clients ON Administrators.AdministratorID = Clients.administratorID) ON Products.ProductID = Clients.ProductID;
    : ------------
    :
    : Thanks
    I'm not sure about the field name with the space. I think that's illegal on Oracle. NM 'cause if it is illegal you'll know long before writing the query. Otherwise here is how its written (i'll use an underscore for the field with the space.
    [code]
    SELECT cl.*, ad.Administrator, pr.Product_Code, pr.Product
    FROM Administrators ad, Clients cl, Products pr
    WHERE ad.AdministratorID = cl.AdministratorID
    AND pr.productID = cl.ProductID
    [/code]

    -Ray

  • : : Heyas,
    : : Hoping some1 can convert this Access Query to its Oracle SQL Equivalent.
    : : -------------
    : : SELECT Clients.*, Administrators.Administrator, Products.[Product Code], Products.Product
    : : FROM Products INNER JOIN (Administrators RIGHT JOIN Clients ON Administrators.AdministratorID = Clients.administratorID) ON Products.ProductID = Clients.ProductID;
    : : ------------
    : :
    : : Thanks
    : I'm not sure about the field name with the space. I think that's illegal on Oracle. NM 'cause if it is illegal you'll know long before writing the query. Otherwise here is how its written (i'll use an underscore for the field with the space.
    : [code]
    : SELECT cl.*, ad.Administrator, pr.Product_Code, pr.Product
    : FROM Administrators ad, Clients cl, Products pr
    : WHERE ad.AdministratorID = cl.AdministratorID
    : AND pr.productID = cl.ProductID
    : [/code]
    :
    : -Ray
    :
    :
    Thanks for the reply,
    Should the Right Join have a (+) on it?

    SELECT cl.*, ad.Administrator, pr.Product_Code, pr.Product
    FROM Administrators ad, Clients cl, Products pr
    WHERE ad.AdministratorID = cl.AdministratorID(+)
    AND pr.productID = cl.ProductID


  • : : : Heyas,
    : : : Hoping some1 can convert this Access Query to its Oracle SQL Equivalent.
    : : : -------------
    : : : SELECT Clients.*, Administrators.Administrator, Products.[Product Code], Products.Product
    : : : FROM Products INNER JOIN (Administrators RIGHT JOIN Clients ON Administrators.AdministratorID = Clients.administratorID) ON Products.ProductID = Clients.ProductID;
    : : : ------------
    : : :
    : : : Thanks
    : : I'm not sure about the field name with the space. I think that's illegal on Oracle. NM 'cause if it is illegal you'll know long before writing the query. Otherwise here is how its written (i'll use an underscore for the field with the space.
    : : [code]
    : : SELECT cl.*, ad.Administrator, pr.Product_Code, pr.Product
    : : FROM Administrators ad, Clients cl, Products pr
    : : WHERE ad.AdministratorID = cl.AdministratorID
    : : AND pr.productID = cl.ProductID
    : : [/code]
    : :
    : : -Ray
    : :
    : :
    : Thanks for the reply,
    : Should the Right Join have a (+) on it?
    :
    : SELECT cl.*, ad.Administrator, pr.Product_Code, pr.Product
    : FROM Administrators ad, Clients cl, Products pr
    : WHERE ad.AdministratorID = cl.AdministratorID(+)
    : AND pr.productID = cl.ProductID
    :
    Sorry... Yes... I read it a little quick. I actually said "What right join?" when I saw the response. :(
    I think you can use *= as well. Not 100% on that though. That might just be SQL server (soon to be MS-unsupported I think).

    Also, the plus should be on the "right" side of the equation.

    -Ray

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion