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
What function does a database engine serve in the sql server?
Explain filtered indexes?
What is cdc in sql server?
What are the difference between clustered and a non-clustered index?
What is Service Broker in sql server 2012?
How to list all schemas in a database?
How can you check the version of sql server?
Define right outer join in sql server joins?
What is the use of keyword with encryption. Create a store procedure with encryption?
How to add the custom code in Report?
Which language rdl files made of?
What is an execution plan? When would you use it?
What is the server name for sql management studio?
What is the use of sql profiler in sql server 2012?
How can I get data from a database on another server?