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

What function does a database engine serve in the sql server?

1043


Explain filtered indexes?

1006


What is cdc in sql server?

1006


What are the difference between clustered and a non-clustered index?

1045


What is Service Broker in sql server 2012?

1025


How to list all schemas in a database?

1064


How can you check the version of sql server?

1100


Define right outer join in sql server joins?

1054


What is the use of keyword with encryption. Create a store procedure with encryption?

965


How to add the custom code in Report?

129


Which language rdl files made of?

130


What is an execution plan? When would you use it?

981


What is the server name for sql management studio?

1030


What is the use of sql profiler in sql server 2012?

904


How can I get data from a database on another server?

1001