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 get the definition of a user defined function back?
How to create an multi-statement table-valued function?
Is the primary key column of a table an index in ms sql server?
explain declarative management framework (dmf) in sql server 2008?
How to delete an existing database user?
Which command is used for user defined error messages?
What are the differences between clustered and non-clustered index?
Do you know what guidelines should be followed to help minimize deadlocks?
Difference between drill down and drill through report.
How to encrypt Strored Procedure in SQL SERVER?
Difference between uniqe index and uniqe constraint?
What is awe?
How to scale out a federation by Sql statement?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
How do I find information about the install locations for the various instances running on a computer?