{"id":11125,"date":"2020-11-29T17:09:57","date_gmt":"2020-11-29T16:09:57","guid":{"rendered":"https:\/\/sdna.lu\/?p=11125"},"modified":"2021-04-28T20:30:40","modified_gmt":"2021-04-28T19:30:40","slug":"query-accounts-being-used-after-account-end-date","status":"publish","type":"post","link":"https:\/\/sdna.lu\/?p=11125","title":{"rendered":"Query: Accounts being used after account end date"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><code>Select [GLAccount].[DBId], [GLAccount].[Number] + ', ' + [GLAccount].[Name], count([GLMovement].[EntryNumber])\nfrom [GLMovement] INNER JOIN [GLAccount]\nOn ([GLMovement].[GLAccountId] = [GLAccount].[Id] and [GLMovement].[DBId] = [GLAccount].[DBId])\nwhere [GLMovement].[Date] &gt; [GLAccount].[EndDate] and Not [GLAccount].[EndDate] &lt; '01\/01\/2000' \nGroup by [GLAccount].[DBId], [GLAccount].[Number] + ', ' + [GLAccount].[Name]\norder by [GLAccount].[DBId], [GLAccount].[Number] + ', ' + [GLAccount].[Name]\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Select [GLAccount].[DBId], [GLAccount].[Number] + &#8216;, &#8216; + [GLAccount].[Name], count([GLMovement].[EntryNumber]) from [GLMovement] INNER JOIN [GLAccount] On ([GLMovement].[GLAccountId] = [GLAccount].[Id] and [GLMovement].[DBId] = [GLAccount].[DBId]) where [GLMovement].[Date] &gt; [GLAccount].[EndDate] and Not [GLAccount].[EndDate] &lt; &#8217;01\/01\/2000&#8217; Group by [GLAccount].[DBId], [GLAccount].[Number] + &#8216;, &#8216; + [GLAccount].[Name] order by [GLAccount].[DBId], [GLAccount].[Number] + &#8216;, &#8216; + [GLAccount].[Name]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[],"class_list":["post-11125","post","type-post","status-publish","format-standard","hentry","category-query"],"_links":{"self":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/11125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11125"}],"version-history":[{"count":10,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/11125\/revisions"}],"predecessor-version":[{"id":11225,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/11125\/revisions\/11225"}],"wp:attachment":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}