Viewing post 1 (of 1 total)
Hi there!
Here a sample code:
CREATE PROCEDURE test
@par tinyint
AS
select *
from TABLE
order by
case @par WHEN 1 THEN field1 ELSE NULL END,
case @par WHEN 2 THEN field2 ELSE NULL END
September 1, 2003 at 12:48 am
#472077