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

How does clustered and non clustered index work?

0 Answers  


How to create a trigger for insert only?

0 Answers  


What is the bookmark lookup and rid lookup?

0 Answers  


What are three major types of constraints?

0 Answers  


what is performance tunning in sql server ? explain.

1 Answers   Thomson Reuters,


What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?

0 Answers  


What should be the fill factor for indexes created on tables? : sql server database administration

0 Answers  


How to use copy and concatenate commands in SQL?

0 Answers   Amdocs,


List some advantages and disadvantages of stored procedure?

0 Answers  


Can a table be moved to different filegroup?

0 Answers  


How do you run a trace?

0 Answers  


Explain index in sql server?

0 Answers  


Categories