{"id":7233,"date":"2019-10-25T14:50:24","date_gmt":"2019-10-25T13:50:24","guid":{"rendered":"http:\/\/help.sdna.lu\/?p=7233&#038;lang=en"},"modified":"2021-04-28T20:33:53","modified_gmt":"2021-04-28T19:33:53","slug":"query-select-double-companies-based-upon-vat-number","status":"publish","type":"post","link":"https:\/\/sdna.lu\/?p=7233","title":{"rendered":"Query: Select Companies having double VAT Numbers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><code>Select Replace([IBLCNum],' ', ''), [Name] from [Company] <br>where [DBId] = 3 and Replace([IBLCNum],' ', '') in <br>(Select Replace([IBLCNum],' ', '') from [Company] <br>where not [IBLCNum] = '' <br>and [DBId] = 3<br>Group by Replace([IBLCNum],' ', '') <br>having count(*) &gt; 1) <br>order by Replace([IBLCNum],' ', ''), [Name]<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Select Replace([IBLCNum],&#8217; &#8216;, &#8221;), [Name] from [Company] where [DBId] = 3 and Replace([IBLCNum],&#8217; &#8216;, &#8221;) in (Select Replace([IBLCNum],&#8217; &#8216;, &#8221;) from [Company] where not [IBLCNum] = &#8221; and [DBId] = 3Group by Replace([IBLCNum],&#8217; &#8216;, &#8221;) having count(*) &gt; 1) order by Replace([IBLCNum],&#8217; &#8216;, &#8221;), [Name]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[],"class_list":["post-7233","post","type-post","status-publish","format-standard","hentry","category-query"],"_links":{"self":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/7233","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7233"}],"version-history":[{"count":5,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/7233\/revisions"}],"predecessor-version":[{"id":11502,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/7233\/revisions\/11502"}],"wp:attachment":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}