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 / krishna mohan thamisetty

select *
from table
where date between GETDATE()-(5*365) and GETDATE()

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we add a cpu to sql server?

954


Differentiate between a having clause and a where clause.

923


What are trace files?

893


What samples and sample databases are provided by microsoft?

969


Explain following error properties?

954


Why I can not enter 0.001 second in date and time literals in ms sql server?

1010


What is database dimension? : sql server analysis services, ssas

1028


I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible

2179


what is the difference between openrowset and openquery?

1022


What is the order in which the sql query is executed?

878


What are the steps you can take to avoid “deadlocks”?

918


Does order by actually change the order of the data in the tables or does it just change the output?

1078


Explain cross join or cartesian product in sql?

839


Is the order of columns in the set clause important in ms sql server?

925


query processing

2101