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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / amlan roy
Select...........
from....
........
where DEPT_TABLE.DEPNO = EMP_TABLE.DEPNO.
AND DOJ between '01/01/2007' and '01/01/2008'
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / harsha
select e.name,e.deptname,d.doj from emp_table e,dept_table d
where e.deptno=d.deptno and doj between '01-jan-2007' and
'01-jan-2008'
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / arul
Select a.Name,a.DeptName,b.doj From Emp_Table as
a,Dept_Table as b Where a.Deptno=b.deptno and b.doj
between '01-jan-2007' And '01-jan-2008'
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / ramesh
select e.name,e.deptname,d.doj from emp_table e,dept_table d
where e.deptno=d.deptno and doj between '01-jan-2007' and
'01-jan-2008';
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / s
select name.deptname.doj from emp_table innerjoin dept_table
on emp_table.deptno = dept_table.deptno
Is This Answer Correct ? | 3 Yes | 5 No |
How do you filter out the rows retrieved from a Db2 table ?
how can you copy records present in a flat physical file to a database file(physical file).please explain in rpg400 with a simple example
I have a main program (A) where we delete some rows in table in a cursor, and we commit it in sub program(B). What will happen - will we get an error or not?
How to fetch the last row from the table in SQL (db2)?
what is the difference between normal select query and currosor
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
Explain about open switch business continuity software?
How to create db2 table in mainframe?
what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?
3 Answers Cap Gemini, Tech Mahindra,
Which command is used to remove all rows from a table?
suppose in my table 10 rows are there , i want to update odd rows salary as 90000 ? how u do it ? any one help me ? what do we use here cursor-fetch or normal sql ?
Which transaction use a command thread ?