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 to get a list of columns in a view using the "sp_help" stored procedure?

0 Answers  


What is the default port for SQL Server over a firewall?

0 Answers   Microsoft,


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

0 Answers  


What is the recovery model?

0 Answers  


Can we take the full database backup in log shipping?

0 Answers  


What is shrink log file?

0 Answers  


What are filegroups in sql server?

0 Answers  


What are the two types of concurrency?

4 Answers  


What is the most common type of join?

0 Answers  


explain databases and sql server databases architecture? : Sql server database administration

0 Answers  


What do you understand by check constraint in sql server?

0 Answers  


Can the “if update (colname)” statement be used in a delete trigger?

0 Answers  


Categories