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 |
Are semicolons required at the end of sql statements in sql server 2005?
how many layers of tcp/ip protocol combined of? : Sql server database administration
Tell me about Triggers?
Can I remove the default constraint columns in SQL SERVER?
What is join and name different type of joins?
Can we create SP inside SP ? If no Y ? If yes Y ? Explain with an example ?
How m-m relationships are implemented?
Can you explain the role of each service?
Which institute is best for SQL Server 2005 Training?
How to change the name of a database user?
How do we know if any query is retrieving a large amount of data or very little data?
What is the difference between stored procedure and user defined functions?
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)