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 are foreign keys in db2?
Which component is used to execute the sql statements?
How connect db2 database to datastage?
How to access db2 tables in mainframe?
What is an instance in db2?
What is reorg?
What is netezza database?
What is deadlock in db2?
What is a db2 schema?
How do we specify index to include or not during bind process.
Explain correlated sub-queries.
Where can you declare a cursor in a cobol-db2 program?
How many databases are there?
Which isolation level provides maximum concurrency?
What is universal database?