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
Describe and explain about SQL native client?
What is the most common type of join?
Why is there a performance difference between two similar queries where one uses union and the other uses union all?
what is a self join? : Sql server database administration
What are different types of replication in sql server?
What is the difference between inner join and equi join?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
What are the limitations/drawbacks or ssrs 2008 r2?
what are the different ways to return the rowcount of a table?
What is instead of dml trigger?
What the class forname () does?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?
What is shared lock?
How to enter unicode character string literals in ms sql server?