I am having a problem with my stored procedure. I am trying to get my database to sort the data in desc order using the date. I would like the most recent date to show first. When I use the code below, I get the following error: Error 156: Incorrect syntax near the keyword 'Order'. Thank you for your help in advance.
CREATE PROCEDURE [dbo].[update_tblevent]
( @eventid_1 int,
@event_3 varchar(255),
@date_4 datetime)
AS UPDATE [rrevent].[dbo].[tblevent]
SET
[event] = @event_3,
[date] = @date_4
WHERE
( [eventid] = @eventid_1 )
Order by [date] desc
CREATE PROCEDURE [dbo].[update_tblevent]
( @eventid_1 int,
@event_3 varchar(255),
@date_4 datetime)
AS UPDATE [rrevent].[dbo].[tblevent]
SET
[event] = @event_3,
[date] = @date_4
WHERE
( [eventid] = @eventid_1 )
Order by [date] desc