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
For a parameterized order by clause:
CREATE PROCEDURE sp_ParameterizedOrderBy @orderby VARCHAR(25)
AS
BEGIN
SELECT *
FROM information_schema.columns
ORDER BY CASE @orderby
...
April 19, 2013 at 7:03 am
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
Viewing 3 posts - 1 through 3 (of 3 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy