Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LO..

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

Post New Answer

More DB2 Interview Questions

when we are tying to update a table having 100 rows. if the program abends when updating 51 row . how to start updating again from the 51 row .what was the logic

2 Answers   TCS,


My cobol program(not having any sql statements) is calling another cobol program ( having sql statements), what is needed for compilation and run in jcls .

3 Answers   Cap Gemini, RBS,


What does runstats do in db2?

0 Answers  


Give a brief description of db2 isolation levels?

0 Answers  


where will u check for sqlcode ?

2 Answers   TCS,


What is the function of logging in the db2 database?

0 Answers  


Define sqlca.

0 Answers  


wht r the requirements for writing a cobol-db2 pgm ?

4 Answers   IBM,


What is a host variable?

3 Answers  


How to resolve -818 sql code in DB2?

2 Answers   Cap Gemini,


What is the cobol picture clause of the db2 data types date, time, timestamp?

0 Answers  


what's the error code for Unique Index Violation?

2 Answers  


Categories