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 vector point function?

1005


Where is sql database stored?

921


What is the non-clustered index in sql?

1012


How many types of indexes are there in sql?

935


What is the difference between sql, mysql and sql server?

1016


What is sql profiling in oracle?

998


What is sql scripting?

1037


Is null operator in sql?

980


What does varchar include?

908


Which language is used in sql?

992


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

1006


How many types of privileges are available in sql?

1286


What are sql triggers used for?

959


what is the difference between truncate and drop statements? : Sql dba

1036


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

901