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"
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / krishna mohan thamisetty
select datename(mm, startdate) startdate, datename(mm,
enddate) enddate, location from t1
Is This Answer Correct ? | 0 Yes | 2 No |
What are user-defined functions (udfs) in sql server?
How do I port a number to sql server?
Explain candidate key, alternate key, and composite key?
What does sql server mean?
What is a trigger? Why we need it?
What are the differences between having and where clause.
what is checksum in sql server.........???
Which sql server is best?
What command do we use to rename a db, a table and a column?
what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
What command would you use to create an index?
Creating Tables Using SELECT