ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  MainFrame  >>  IBM MainFrame  >>  DB2
 
 


 

 
 COBOL interview questions  COBOL Interview Questions
 JCL interview questions  JCL Interview Questions
 CICS interview questions  CICS Interview Questions
 DB2 interview questions  DB2 Interview Questions
 IMS interview questions  IMS Interview Questions
 IDMS interview questions  IDMS Interview Questions
 Natural interview questions  Natural Interview Questions
 ADABAS interview questions  ADABAS Interview Questions
 REXX interview questions  REXX Interview Questions
 Assembler interview questions  Assembler Interview Questions
 CLIST interview questions  CLIST Interview Questions
 QMF interview questions  QMF Interview Questions
 MVS interview questions  MVS Interview Questions
 OS390 interview questions  OS390 Interview Questions
 OS 2 interview questions  OS 2 Interview Questions
 VSAM interview questions  VSAM Interview Questions
 QSAM interview questions  QSAM Interview Questions
 Sysplex interview questions  Sysplex Interview Questions
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions
Question
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?
 Question Submitted By :: Ravindra_vemula
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
select name.deptname.doj from emp_table innerjoin dept_table
on emp_table.deptno = dept_table.deptno
 
Is This Answer Correct ?    2 Yes 2 No
S
 
  Re: 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
# 2
Select...........
from....
........
where DEPT_TABLE.DEPNO = EMP_TABLE.DEPNO.
AND DOJ  between '01/01/2007' and '01/01/2008'
 
Is This Answer Correct ?    7 Yes 1 No
Amlan Roy
 
 
 
  Re: 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
# 3
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 ?    8 Yes 1 No
Nimsatprasad
[Covansys]
 
  Re: 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
# 4
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 ?    3 Yes 1 No
Harsha
 
  Re: 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
# 5
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 ?    2 Yes 0 No
Arul
 

 
 
 
Other DB2 Interview Questions
 
  Question Asked @ Answers
 
Suppose the outcome of executing a query results in a row having null. Based on the answer how you use it? Its declaration and inclusion? Verizon2
How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?  2
What are the advantages of using a PACKAGE?  2
Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?  1
Can a array declared with an index be displayed(readable format) in spool? UST2
What is a view? Why use it?  2
Suppose if I need to update a column, how you do that using cursor? Verizon2
What does the sqlcode of -818 pertain to?  2
How many Buffer pools are there in DB2 and what are they?  1
What is a DB2 bind? Logica-CMG1
What happens to a tablespace when its recovery infromation has been removed and a full recovery is no longer possible?  2
What is COPY PENDING status?  5
5 rows are inserted to a DB2 Table. Next 3 of those are updated, then a rollback is issued. What would happen when the rollback is issued?  2
What is the FREE command?  1
How to insert more than one record using insert? IBM4
What is read-only cursor?  1
can any one expalin check point with an example?  1
What is the difference between SYNONYM and ALIAS?  2
In a single table,How to retrieve a employee-id of an employee who works in more than one department? Cap-Gemini11
What is the SQL query to select, delete and get count of duplicate rows in DB2?  2
 
For more DB2 Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com