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
What is drop table?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
What is dbrm? When it will be created?
How to rename a table in DB2 ?
How connect db2 database to datastage?
Explain in brief how does db2 determine what lock-size to use?
What is a bind in db2?
What is the max length of sqlca?
What is db2 purescale?
What is bind package and plan in db2?
What is the use of with ur in db2?
What is nvl in db2?
What is multi row fetch in db2?
Mention a credible reason why select* is never given preference in an sql program that has been embedded.
What does reorg do in db2?