Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by and parameters
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00727721
Message ID:
00727727
Vues:
11
Check out http://www.sqlmag.com/Articles/Index.cfm?ArticleID=16495 HTH

>Can someone tell me how one used parameters in the order by clause to get some dynamic ordering without dynamic query building?
>
>when I use:
>group by username
>order by @sortFld
>I get:
>variables are only allowed when ordering by an expression referencing a column name.
>
>Should I use case structures in order by clause?
>I've had problems with that in context of group by
>
>or a if structure?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform