Not much happening…

Lately I’ve been doing lots of production work at the customers site, so there’s not really much that involves new techniques etc.

I did however come up with a nice solution to a small problem I faced. Order results by the last character. In normal SQL you can do an Order by to order by a certain column. Write desc after this to do this descending instead of ascending. I guess you all know that.

But what if I want to order by the last character of a certain column. You can use this order by clause:

order by substr(column,-1,1)

Maybe you can have some fun with this…

Leave a Reply

Your email address will not be published. Required fields are marked *