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
Can we update view in db2?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
What is the use of predicate?
What is a db2 package?
Explain the function of data manager.
What is cursor with hold option in db2?
Which component is used to execute the sql statements?
How does db2 sample database connect?
What is a bind card?
What is dclgen (declaration generator)?
What is with ur in db2?
What is the reason behind not using select * in embedded sql programs?
Is ibm db2 free?
What does a deadlock mean in DB2?
Define check constraint.