Hi i have a store procedure, where i do a select query. I want order this by an external parameter.
I post an minimal example:
CREATE PROCEDURE [dbo].[up_missioni_get_data]
@order VarChar(100)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT * from missioni ORDER BY ...
END
What can i write in order by for do that?
thanks