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

how can I make a script that can be bi-language (supports english, german)? : Sql dba

1007


Can a composite key be null?

970


What is meaning of <> in sql?

1063


What are different types of sql?

1174


How is a process of pl/sql compiled?

1145


What is cross join example?

986


explain the delete statements in sql

1039


What is the current version of sql?

1017


What program will open a mdb file?

955


what is the use of set statement in tsql? : Transact sql

1001


What is the difference between function, procedure and package in pl/sql?

1240


Does google use sql?

950


What kind of join is join?

957


explain the advantages and disadvantages of stored procedure? : Sql dba

1001


Is coalesce faster than isnull?

962