{"id":160,"date":"2007-07-31T16:00:53","date_gmt":"2007-07-31T15:00:53","guid":{"rendered":"http:\/\/bar-solutions.com\/wordpress\/?p=160"},"modified":"2007-07-31T16:00:53","modified_gmt":"2007-07-31T15:00:53","slug":"not-much-happening","status":"publish","type":"post","link":"https:\/\/blog.bar-solutions.com\/?p=160","title":{"rendered":"Not much happening&#8230;"},"content":{"rendered":"<p>Lately I&#8217;ve been doing lots of production work at the customers site, so there&#8217;s not really much that involves new techniques etc. <\/p>\n<p>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.<\/p>\n<p>But what if I want to order by the last character of a certain column. You can use this order by clause:<\/p>\n<p>order by substr(column,-1,1)<\/p>\n<p>Maybe you can have some fun with this&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lately I&#8217;ve been doing lots of production work at the customers site, so there&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,9],"tags":[],"class_list":["post-160","post","type-post","status-publish","format-standard","hentry","category-oracle","category-sql"],"_links":{"self":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=160"}],"version-history":[{"count":0,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/160\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}