how to order list that has date and a word in sql server -


case when prefinallist.truckbooked null 'immediate' else cast(prefinallist.previous_date varchar) end eta  

the list contain either the word immediate or datetime.

how show immediate on top , date in acending.

you can try use order this:

order (`eta` = 'immediate') asc 

or can use case statement inside order like

order case when eta = 'immediate' 1 else 2 end 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -