come posso far funzionare questo order by dinamico?codice:order by case @P_ORDER_BY when 1 then Nome ASC when 2 then Nome DESC when 3 then Cognome ASC when 4 then Cognome DESC when 5 then Tipologia ASC when 6 then Tipologia DESC when 7 then Stato ASC when 8 then Stato DESC when 9 then DataInserimento ASC when 10 then DataInserimento DESC when 11 then Profilo ASC when 12 then Profilo DESC else Utenti.Id end

Rispondi quotando