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
How can we read records for specific member in CL? AND rpg?
What is lock escalation in db2?
Why do we bind in db2?
what is the sqlcode -501
What is the connection string to connect to the DB2 Database ?
What is the purpose of rollback and commit?
Define buffer pool.
What is table space in db2?
What does db2 stand for?
What is db2 stogroup?
What is sqlca’s maximum length?
Mention data types used in db2 ?
Is db2 a mainframe database?
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
What is the role of union all and union