Home / Software / Tips and Tricks / How to ORDER BY on a select when the sort column data types are different ?

How to ORDER BY on a select when the sort column data types are different ?

Updated:  04/26/2016 08:04 AM
Author:  Shiju Mathews

Status:    Resolved.


If the data types in all the sorting columns are same, it is good to use one case statement. But in reality the sorting columns can be different according to the incoming selection. On this situation we need to use multiple case statements as shown bellow.