I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER
DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION
AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT
TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01-
JAN-2007 TO 01-JAN-2008?

Answer Posted / nimsatprasad

Try this if wrong let me know...

SELECT A.NAME
,A.DEPTNAME
,B.DOJ
FROM EMP_TABLE A
,DEPT_TABLE.EMP_TABLE B
WHERE A.DEPTNO = B.DEPTNO
AND B.DOJ BETWEEN '01-01-2007' AND '01-01-2008'
;

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is drop table?

584


How can tablespace be moved to another dasd volume that is allocated for that tablespace?

751


What is dbrm? When it will be created?

604


How to rename a table in DB2 ?

643


How connect db2 database to datastage?

769






Explain in brief how does db2 determine what lock-size to use?

604


What is a bind in db2?

594


What is the max length of sqlca?

770


What is db2 purescale?

553


What is bind package and plan in db2?

598


What is the use of with ur in db2?

624


What is nvl in db2?

633


What is multi row fetch in db2?

614


Mention a credible reason why select* is never given preference in an sql program that has been embedded.

726


What does reorg do in db2?

579