Aug 8, 2001 #1 delorfra Programmer Mar 8, 2001 79 FR Hi, What is the equivalent of ACCESS SQL 'Left joint' statement? Thanks
Aug 8, 2001 1 #2 rcurva Programmer Jul 17, 2001 548 AU 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. Upvote 0 Downvote
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.