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 would you find out the total number of rows in a db2 table?
Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....
What is the information associated with sysibm.syslinks table?
What are the prerogatives?
How do I copy a table in db2?
What is package in db2 mainframe?
What are packages in db2?
How would the varchar column remarks defined?
How to take backup of table in db2?
How do I add a column to a table in db2?
How does db2 sample database connect?
What is ibm db2 used for?
What is temporal table in db2?
How do I add a column to an existing table in db2?
What is performance tuning db2?