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

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

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -