Viewing 3 posts - 1 through 3 (of 3 total)
For an example of parameterized orderby clause:
CREATE PROCEDURE sp_ParameterizedOrderBy @orderby VARCHAR(25)
AS
BEGIN
SELECT *
FROM information_schema.columns
ORDER BY CASE @orderby
...
April 19, 2013 at 7:07 am
#1608195
For a parameterized order by clause:
April 19, 2013 at 7:03 am
#1608191
Not brand new technique, but useful indeed.
Same approach can also be used to parametrize the order by clause...
April 18, 2013 at 2:18 am
#1607576