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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to connect Azure federated root database and apply federation in entity framework?

101


Define cross join in sql server joins?

752


System requirements for sql server 2005 express edition?

726


You want to use a perspective in an mdx query. How do you select the perspective?

185


What are approximate numeric data types in ms sql server?

756






How many full-text indexes can a table have?

719


How to insert a new row into a table with "insert into" statements in ms sql server?

718


Why olap is used?

718


Explain how to use linked server?

739


Can we use custom code in ssrs?

776


What is a transactions?

778


What is oltp (online transaction processing)?

745


Explain primary key, foreign key and unique key?

741


List the different normalization forms?

708


Which sql server table is used to hold the stored procedure scripts?

796