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: Convert MS-Access 2 joined queries to Oracle SQL?

Re: Convert MS-Access 2 joined queries to Oracle SQL?

From: April <privatebenjamin_at_hushmail.com>
Date: 10 Apr 2002 12:41:12 -0700
Message-ID: <21e9f79.0204101141.1e715b07@posting.google.com>


So does this mean I can substitute query1 for table1 and query2 for table2 in your example.

I know how to convert the indivdual Access queries to Oracle Sql, it's the join I'm having problems with.

Thanks,
April

Daniel Morgan <damorgan_at_exesolutions.com> wrote in message news:<3CB4534C.89C6F3B9_at_exesolutions.com>...
> If you want to work in Oracle you must learn Oracle. You can not just
> throw Microsoft's version of SQL at it and expect it to work.
>
> The "INNER JOIN" syntax was not added to Oracle until version 9i. In
> Oracle the syntax for joining is to join in the WHERE clause. For example:
>
> SELECT a.field1, b.field2
> FROM table1 a, table2 b
> WHERE a.field1 = b.field7;
>
> Daniel Morgan
>
> April wrote:
>
> > How can I rewrite the following MS-Access queries for Oracle 7.3 sql?
> > I don't know how to join the two queries?
> >
> > This is the query that joins the 2 saved queries, and is the end
> > result that I want:
> >
> > SELECT qry_PEContact.EMPLOYEENAME AS PEContact, qry_Managers.GROUPDATA
> > AS Manager
> > FROM qry_Managers INNER JOIN qry_PEContact ON qry_Managers.DEPTID =
> > qry_PEContact.EMPLOYEEDEPTID;
> >
> > Here is qry_PEContact:
> > SELECT TBLEMPLOYEES.EMPLOYEENAME, TBLEMPLOYEES.EMPLOYEEDEPTID
> > FROM TBLEMPLOYEES;
> >
> > Here is qry_Managers:
> > SELECT TBLCBOCOMBO.GROUPDATA, TBLDEPARTMENTS.DEPTID
> > FROM (TBLDEPARTMENTS INNER JOIN TBLEMPLOYEES ON TBLDEPARTMENTS.DEPTID
> > = TBLEMPLOYEES.EMPLOYEEDEPTID) INNER JOIN TBLCBOCOMBO ON
> > TBLEMPLOYEES.EMPLOYEENAME = TBLCBOCOMBO.GROUPDATA
> > WHERE (((TBLCBOCOMBO.DIVISION)="NM") AND
> > ((TBLEMPLOYEES.APPROVINGAUTHORITY)="True") AND
> > ((TBLCBOCOMBO.GROUPTYPE)="NMContractMgr"));
> >
> > Thanks for your help,
> > April
Received on Wed Apr 10 2002 - 14:41:12 CDT

Original text of this message

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