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"

Answers were Sorted based on User's Feedback



There is table like Events...in that name ,startdate ,enddate,location are the column names write..

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

There is table like Events...in that name ,startdate ,enddate,location are the column names write..

Answer / krishna mohan thamisetty

select datename(mm, startdate) startdate, datename(mm,
enddate) enddate, location from t1

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL Server Interview Questions

Are semicolons required at the end of sql statements in sql server 2005?

0 Answers  


how many layers of tcp/ip protocol combined of? : Sql server database administration

0 Answers  


Tell me about Triggers?

3 Answers   Cap Gemini,


Can I remove the default constraint columns in SQL SERVER?

5 Answers   Value Labs,


What is join and name different type of joins?

0 Answers  


Can we create SP inside SP ? If no Y ? If yes Y ? Explain with an example ?

3 Answers   IBM, L&T,


How m-m relationships are implemented?

2 Answers  


Can you explain the role of each service?

1 Answers  


Which institute is best for SQL Server 2005 Training?

6 Answers  


How to change the name of a database user?

0 Answers  


How do we know if any query is retrieving a large amount of data or very little data?

0 Answers  


What is the difference between stored procedure and user defined functions?

0 Answers  


Categories