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 access path in db2?
What is a page in db2?
What is drop table?
Explain about rct.
How can the firstname and the lastname from the emp table be concatenated to generate complete names?
How do you pull up a query which was previously saved in qmf?
what is the sqlcode -501
Is it possible using max on a char column?
How to rename a table in DB2 ?
What is ibm db2 client?
What is the physical storage length of time data type?
Is db2 a programming language?
If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?
What is the use of predicate?
Which are the db2 tools to protect integrity of the database?