Answer Posted / rajkumar
DECLARE @IsLeapYear BIT
SET @IsLeapYear = 0
IF (YEAR( @pDate ) % 4 = 0 AND YEAR( @pDate ) % 100 != 0) OR
YEAR( @pDate ) % 400 = 0
SET @IsLeapYear = 1
select 365 + @IsLeapYear
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which are new data types introduced in sql server 2008?
Benefits of Stored Procedures?
What does Master database contains?
List out the different types of locks available in sql server?
How to insert a new row into a table with "insert into" statements in ms sql server?
Does group by or order by come first?
How do I open port 1433?
We need to perform what steps in the following order to work with a cursor?
Which trace flags are enabled in sql server?
What is sub query and its properties?
Explain query editor regions
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?
You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?
Explain the ways to controlling cursor behavior?
What is the use of partition by in sql server?