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...

How will u get 5 years back record?

Answer Posted / muhammadrashidmughal

select *
from table
where date between '01/01/2003' and '12-31-2008'

or

today is 09-08-2008

select *
from table
where year(date)=year(getdate)-5 and month(date)= '08' and
day(date) ='09'

or

select *
from table
where date >='09-08-2003'
and date<='09-08-2008'

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do clustered indexes store data?

1053


What are the advantages of paper records?

907


As per your opinion what are the five top responsibilities of a dba? : sql server database administration

1061


How can you ensure that the database and sql server based application perform well?

1010


What is SQL Azure Fabric?

108


What is a deadlock and what is a live lock?

951


How can I change procedure name in sql server?

972


How extra digits are handled with numeric data type literals?

904


How to maintain a fill factor in existing indexes?

943


What languages bi uses to achieve the goal?

947


what stored procedure can you use to display the current processes? : Sql server administration

956


When you should use a low fill factor?

941


Explain ranking functions?

990


What is inner join in sql server joins?

975


What is table level trigger?

948