Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Name of the employee who is senior most in the organization

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
spriya

New User


Joined: 06 Oct 2005
Posts: 42

PostPosted: Fri Jun 30, 2006 1:51 pm    Post subject: Name of the employee who is senior most in the organization
Reply with quote

Hi friends ,
please give query for the following situation

Give an employee table with employee number, name and date of joining details write a query to get the name of the employee who is senior most in the organization
Back to top
View user's profile Send private message

Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Mon Jul 03, 2006 10:33 am    Post subject: Hi
Reply with quote

Assmuning your date is stored as YYYY-MM-DD format in column of table

EMP
=============
Hire-Date Name
------------------------
2006-02-09 Albert
1995-02-06 Susan



Then issuing the SQL

SELECT MIN(Hire-Date) FROM EMP ;

This would give the senior employee in EMP table.

EMP
=============
Hire-Date Name
------------------------
1995-02-06 Susan
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Mon Jul 03, 2006 10:34 am    Post subject: Hi
Reply with quote

Assuming your date is stored as YYYY-MM-DD format in column of table

EMP
=============
Hire-Date Name
------------------------
2006-02-09 Albert
1995-02-06 Susan



Then issuing the SQL

SELECT MIN(Hire-Date) FROM EMP ;

This would give the senior employee in EMP table.

EMP
=============
Hire-Date Name
------------------------
1995-02-06 Susan


-Han
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts @@ Promoted to Senior Member@@ Rohit Umarjikar General Talk & Fun Stuff 1 Wed Oct 28, 2015 4:06 am
No new posts Employee Referral CSC - Last Date Mar... Kavita Bhaya Mainframe Jobs 0 Wed Feb 26, 2014 3:47 pm
This topic is locked: you cannot edit posts or make replies. z/OS Senior Systems Programmer requir... Zen Yash Mainframe Jobs 0 Sat Mar 23, 2013 1:36 am
No new posts CSC - Employee Referral for Mainframe... msk.sandeep Mainframe Jobs 0 Thu Oct 18, 2012 1:29 pm
This topic is locked: you cannot edit posts or make replies. Senior Java Developer, 5 years, Banga... gaurav.rajvanshi Mainframe Jobs 0 Fri Mar 02, 2012 7:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us