Hello,
I need to have a stored procedure, which performs sorting. Something like
this:
CREATE PROCEDURE procname
@sortby varchar(30)
AS
BEGIN
SELECT some, columns
FROM some_table
ORDER BY @sortby
END
(of course, i know this won't work, but it gives the idea of what i mean)
Is there a possibility to write a procedure which behaves like that? It is
important for me not to have multiple procedures just for different sorting
criteria...
Thanks,
Mike