How to complete this query? [message #526491] |
Tue, 11 October 2011 05:07 |
|
m3nhaq
Messages: 20 Registered: September 2011 Location: Pakistan
|
Junior Member |
|
|
Hello Friends!
Kindly help me to complete this query.
select t.employee_code,
(t.first_name || ' ' || t.last_name) name,
add_months(t.date_of_joining, 120) as mature_date
from employee t, employee_type et
where et.employee_type = t.employee_type
AND et.description = 'REGULAR'
AND mature_date >= '11-oct-2011'
AND ET.POST = 1
AND T.POST = 1;
I am adding 120 months in employee join date and checking is Employee maturity date grater than today date or not. I need to show only 2 fields as I want to use this query in LIST items.
Thanks
[Updated on: Tue, 11 October 2011 05:13] by Moderator Report message to a moderator
|
|
|
Re: How to complete this query? [message #526495 is a reply to message #526491] |
Tue, 11 October 2011 05:15 |
|
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
select t.employee_code,
(t.first_name || ' ' || t.last_name) name
from employee t, employee_type et
where et.employee_type = t.employee_type
AND et.description = 'REGULAR'
AND add_months(t.date_of_joining, 120) >= To_date('11-10-2011','DD-MM-YYYY')
AND ET.POST = 1
AND T.POST = 1;
Regards
Michel
|
|
|