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

Can we update view in db2?

745


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

932


What is the use of predicate?

769


What is a db2 package?

772


Explain the function of data manager.

780






What is cursor with hold option in db2?

787


Which component is used to execute the sql statements?

816


How does db2 sample database connect?

759


What is a bind card?

855


What is dclgen (declaration generator)?

795


What is with ur in db2?

993


What is the reason behind not using select * in embedded sql programs?

818


Is ibm db2 free?

748


What does a deadlock mean in DB2?

823


Define check constraint.

824