Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order by empty first
Message
 
 
À
10/09/2017 01:13:15
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows Server 2012
Divers
Thread ID:
01654178
Message ID:
01654180
Vues:
36
>Is there a way, without using UNION, to order a result with empty date values at first, following my most recent date values?

By empty you meant NULL, right?

order by coalesce(myDate, '30000101') DESC
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform