hi
this is storeprocedure in database:
CREATE procedure [dbo].[Select_FilmGenre]
as
begin
SET NOCOUNT ON
select DISTINCT Genre
from SerialFilm
order by GenrePre asc
but when I run it this error happen:
Msg 145, Level 15, State 1, Procedure Select_FilmGenre, Line 5
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.
what should I do?
Best Regards
Neda