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 want to display the employees who have joined in last two
months. (It should be executed randomly means If I execute
the query in March it should display Jan and Feb joined
employees. Same query if i execute in Feb, 2007 it should
display dec, 2006 and jan 2007 joined employees.

Answer Posted / pracheth

select * from temployees where to_char(hiredate,
'month') in
(to_char(trunc(sysdate,'month')-30,'month'),to_char(trunc(sysdate,'month')-60,'month'))

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is 'mysqld'? : Sql dba

1016


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

1490


What does an inner join do?

1248


what is the difference between primary key and unique key? : Sql dba

1085


Why left join is used in sql?

1019


Can %notfound return null after a fetch?

1101


How do you declare a variable in pl sql?

1070


Can we use the cursor's to create the collection in PL/SQL?

1092


Is sql sequential or random?

1086


What are types of indexes in sql?

1128


Is primary key is clustered index?

1042


What is rank function in sql?

1070


What is pragma in sql?

1125


What is Difference Between Unique and Primary Key Constraints?

1153


What are triggers in sql?

1059