Home » Developer & Programmer » Forms » How to complete this query? (Oracle Form6i and SQL)
How to complete this query? [message #526491] Tue, 11 October 2011 05:07 Go to next message
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 Smile

[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 Go to previous message
Michel Cadot
Messages: 68673
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: Slow performance using OLE2 reading xls file
Next Topic: Java in Forms: Exception_.toString
Goto Forum:
  


Current Time: Sun Aug 11 08:26:10 CDT 2024