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
Post a Comment