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 you collect the date from current date to last
older 6 days date in sql server 2005

Answers were Sorted based on User's Feedback



How will you collect the date from current date to last older 6 days date in sql server 2005..

Answer / gopi muluka

Using DATEADD Function compare get the requited values

SELECT DATEADD(DD,-6,GETDATE())

Is This Answer Correct ?    9 Yes 0 No

How will you collect the date from current date to last older 6 days date in sql server 2005..

Answer / jitendra sharma

SELECT DATEADD(DD,-6,GETDATE()) this is right...........

Is This Answer Correct ?    4 Yes 0 No

How will you collect the date from current date to last older 6 days date in sql server 2005..

Answer / hairlin vasanth raj

ALTER procedure [dbo].[p1]
as
declare
@i int
set @i = 0
begin
set nocount on
while (@i < 6)
begin
SELECT DATEADD(DD,-@i,GETDATE()) as date
set @i=@i+1
end
end


exec p1

Is This Answer Correct ?    1 Yes 0 No

How will you collect the date from current date to last older 6 days date in sql server 2005..

Answer / sreeram

select convert(varchar,cast(dateadd(dd,-6,getdate()) as datetime),101)

ans:09/21/2010

ofcourse the above are also correct

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is a domain constraint give an example?

0 Answers  


When do u use clustered index and non-clustered index?

3 Answers   IBM,


How to connect ms access to sql servers through odbc?

0 Answers  


Give an example of SQL injection attack ?

0 Answers   HAL,


Introduction of rollup clause using sum and group by clause?

0 Answers  


How to modify the underlying query of an existing view?

0 Answers  


Explain what is the purpose of sql profiler in sql server?

0 Answers  


What is check constraint in sql server?

0 Answers  


What is Report Server,Report Manager and Report Builder in SSRS 2005?

1 Answers  


What is the recovery model?

0 Answers  


What is lock escalation and what is its purpose?

0 Answers  


What are the default system databases in sql server 2000?

0 Answers  


Categories