There is table like Events...in that name ,startdate
,enddate,location are the column names
write a stored Procedure for this table to get events by
Months "GetEventsByMonths"

Answer Posted / newbie

CREATE PROCEDURE GetEventsByMonths
@MONTH VARCHAR(15)
AS

SET NOCOUNT ON

SELECT name,DATENAME(MONTH,startdate) AS Startmonth
FROM Events
WHERE DATENAME(MONTH,startdate) = @MONTH
GROUP BY name,DATENAME(MONTH,startdate)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ssl in sql server?

552


How to test odbc dsn connection settings?

537


What is a trigger and types of a trigger?

572


Can I disable or restrict ssrs export formats (rendering formats)?

108


What is the purpose of the model database?

603






How ssrs maintain security?

583


Can we install sql server 2016 on windows 7?

677


What is the difference between row_number and dense_rank?

443


What are the different types of data sources in ssrs?

142


Explain use of expression builder.

570


You want to use bids to deploy a report to a different server than the one you chose in the report wizard. How can you change the server url?

110


What is the usage of the sign function?

532


Can You Use A Stored Procedure To Provide Data To An Ssrs Report?

109


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

543


What is difference between cte and view?

526