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
Explain timestamp datatype?
When I run the sql server 2000 setup, it just hangs. What do I do?
how would you improve etl (extract, transform, load) throughput?
What is stretch database in sql server?
What is linked report?
Write a query for primary key constraint with identity key word?
Mention the differences between local and global temporary tables.
Can you explain what are commit and rollback in sql?
What is view in sql?
Why I am getting this error when renaming a database in ms sql server?
what changed between the previous version of sql server and the current version? : Sql server database administration
What is a schema in ms sql server 2005?
Where views are stored in sql server?
How to resolve the orphan use problem? : sql server security
Can you import Microsoft Excel data to SSRS?