How will you collect the date from current date to last
older 6 days date in sql server 2005
Answer Posted / 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 |
Post New Answer View All Answers
What keyword you will use to get schema appended to the result set of a ‘for xml’ query?
Can I save my report as html, excel or word? : sql server management studio
What is difference between rownum and rowid?
What is tabulation?
What is an indice?
hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.
What are the advantages of sql stored procedure?
What is database dimension? : sql server analysis services, ssas
In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram
Can sql servers link to other servers?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
Explain the difference between cross join and full outer join?
What do you understand by coalesce in sql server?
How to automatically create a log when an exception is being received into SQL Server?
List types of tables in SQL Azure?