{"id":504,"date":"2008-04-24T20:59:38","date_gmt":"2008-04-24T20:59:38","guid":{"rendered":"https:\/\/brennigjones.com\/blog\/?p=504"},"modified":"2008-04-24T21:01:34","modified_gmt":"2008-04-24T21:01:34","slug":"eureka","status":"publish","type":"post","link":"https:\/\/brennigjones.com\/blog\/?p=504","title":{"rendered":"Eureka!"},"content":{"rendered":"<p>Sitting in a meeting this evening, listening to the conversations whilst the brain was free-wheeling, the solution to an old problem that occasionally flopped on to my memory banks occurred.<\/p>\n<p><em><strong>Problem:<\/strong><\/em><br \/>\nselect        app_refno as &#8220;Application Reference&#8221;<br \/>\n, initcap( app_corr_name ) as &#8220;Application Name&#8221;<br \/>\n, initcap( rli_description ) as &#8220;List&#8221;<br \/>\n, initcap( lst_description ) as &#8220;List Status&#8221;<br \/>\n, initcap( par_per_title ) as &#8220;Title&#8221;<br \/>\n, initcap( par_per_forename ) as &#8220;Forename&#8221;<br \/>\n, initcap( par_per_surname ) as &#8220;Surname&#8221;<br \/>\n, par_per_date_of_birth as &#8220;DOB&#8221;<br \/>\n, trunc( months_between( sysdate, par_per_date_of_birth ) \/ 12 ) as &#8220;Age&#8221;<br \/>\n, Q.lar_description as &#8220;Area_Choice&#8221;<br \/>\nfrom        applications<br \/>\n, applic_list_entries<br \/>\n, rehousing_lists<br \/>\n, involved_parties<br \/>\n, parties<br \/>\n, list_statuses l<br \/>\n, (<br \/>\nselect        distinct laa_app_refno<br \/>\n, a2.lar_code<br \/>\n, a2.lar_description<br \/>\nfrom        lettings_area_answers<br \/>\n, lettings_areas a1<br \/>\n, lettings_areas a2<br \/>\nwhere        laa_lar_code = a1.lar_code<br \/>\nand            a1.lar_lar_code = a2.lar_code<br \/>\n) Q<br \/>\nwhere        app_refno = ale_app_refno<br \/>\n&#8211;and            app_refno in (38, 23)<br \/>\nand            ale_rli_code = rli_code<br \/>\nand            rli_current_ind = &#8216;N&#8217;<br \/>\nand            rli_code in (&#8216;HR&#8217;, &#8216;TR&#8217;)<br \/>\nand            ipa_app_refno = app_refno<br \/>\nand            ipa_par_refno = par_refno<br \/>\nand            ale_lst_code = lst_code<br \/>\nand            ale_lst_code in (&#8216;LIVE&#8217;)<br \/>\nand            ipa_main_applicant_ind = &#8216;Y&#8217;<br \/>\nand            trunc( months_between( sysdate, par_per_date_of_birth ) \/ 12 ) &gt;= 60<br \/>\nand            app_refno = Q.laa_app_refno (+)<br \/>\norder by     app_refno<br \/>\n, Q.lar_code<\/p>\n<p><em><strong> Solution?<\/strong><\/em><br \/>\nRight there in Line 30 &#8216;N&#8217; should be &#8216;Y&#8217;.<\/p>\n<p>Der.<\/p>\n<p>At least my brain didn&#8217;t wake me at 03.00 to tell me, it did it while I was still conscious. Yay for brain. Boo for brain for even thinking about this stuff though.<\/p>\n<p>I mean, it&#8217;s hardly important. \ud83d\ude42<\/p>\n<p><em><strong>B<\/strong><\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sitting in a meeting this evening, listening to the conversations whilst the brain was free-wheeling, the solution to an old problem that occasionally flopped on<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-504","post","type-post","status-publish","format-standard","hentry","category-stuff","two-columns"],"_links":{"self":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=504"}],"version-history":[{"count":0,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/504\/revisions"}],"wp:attachment":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}