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
How to throw custom exception in Stored Procedure?
Explain the usage of floor function in sql server.
What are the results of running this script?
What is shrink log file?
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas
Does view occupy space?
What is an etl file?
Describe in brief authentication modes in sql server.
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
What is partition in sql server?
Explain sql server service broker?
Can we add our custom code in ssis?
What is a recursive stored procedure in sql server?
What are the diifferences between the ms sql server vs mysql?
Difference between group by clause and having clause in SQL?