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 / balaji s.t

select convert(varchar(10),
dateadd(dd,-(day(dateadd(mm,1,getdate()))-1), dateadd(mm,-2,getdate())), 120),

convert(varchar(10),dateadd(dd,-(day(getdate())),getdate()),120)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is self join and what is the requirement of self join? : Sql dba

1145


How to use boolean type in select statement?

1083


how to get a list of all tables in a database? : Sql dba

979


What is nosql example?

1039


What is the purpose of my sql?

953


How do I make sql search faster?

1002


Can a commit statement be executed as part of a trigger?

1058


What are sql ddl commands?

1098


Explain what is table in a database?

1065


What view means?

984


What is pl/sql table? Why is it used?

1050


What is sql profiling in oracle?

1068


What are the types of variables use in pl sql?

1044


What does fetching a cursor do?

1096


what does the t-sql command ident_current does? : Transact sql

987