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
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 |
Answer / krishna mohan thamisetty
select datename(mm, startdate) startdate, datename(mm,
enddate) enddate, location from t1
| Is This Answer Correct ? | 0 Yes | 2 No |
How do I start sql server 2016?
What are the events recorded in a transaction log?
What are the new features introduced in SQL Server 2000? What changed between the previous version of SQL Server and the current version?
Why is there a performance difference between two similar queries where one uses union and the other uses union all?
Explain the flow of creating a cube? : sql server analysis services, ssas
What is sql server locking?
What is unique key constraint?
if no size is defined while creating the database, what size will the database have? : Sql server administration
What new changes are being made in SQL Server?
What is co-related sub query?
How to get a list of all tables with "sys.tables" view in ms sql server?
What is primary key, unique key, and foreign key?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)