Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Equivalent of ACCESS left joint 1

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Hi,

What is the equivalent of ACCESS SQL 'Left joint' statement?

Thanks
 

I am not too familiar with the ACCESS but I believe this has something to do with outer joins. You can use the following as example:

EMP table
EMP_NO DEPTNO
--------------- ---------------
1 10
2 20
3 30

DEPT table
DEPTNO DEPTNAME
--------------- ----------
10 TOKYO
20 NEW YORK

the LEFT join:

SELECT b.emp_no, b.deptno, a.deptno
FROM dept a, emp b
WHERE a.deptno(+) = b.deptno;

the RIGHT join:

SELECT a.emp_no, a.deptno, b.deptno
FROM emp a, dept b
WHERE a.deptno = b.deptno(+);


EMP_NO DEPTNO DEPTNO
--------------- --------------- ---------------
1 10 10
2 20 20
3 30

Its just a matter of positioning of the driving table and the need for the SQl to use such join.

Hope my info helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top