Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to get the definition of a user defined function back?

1030


How to create an multi-statement table-valued function?

974


Is the primary key column of a table an index in ms sql server?

946


explain declarative management framework (dmf) in sql server 2008?

972


How to delete an existing database user?

1001


Which command is used for user defined error messages?

1052


What are the differences between clustered and non-clustered index?

1003


Do you know what guidelines should be followed to help minimize deadlocks?

956


Difference between drill down and drill through report.

936


How to encrypt Strored Procedure in SQL SERVER?

1148


Difference between uniqe index and uniqe constraint?

950


What is awe?

990


How to scale out a federation by Sql statement?

116


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

938


How do I find information about the install locations for the various instances running on a computer?

1063