﻿{"id":51,"date":"2015-01-12T22:49:44","date_gmt":"2015-01-12T14:49:44","guid":{"rendered":"http:\/\/www.llku.com\/llku\/?p=51"},"modified":"2015-01-13T08:52:39","modified_gmt":"2015-01-13T00:52:39","slug":"%e8%8e%b7%e5%8f%96%e4%be%9b%e5%ba%94%e5%95%86%e7%9b%b8%e5%85%b3%e4%bf%a1%e6%81%afsql","status":"publish","type":"post","link":"https:\/\/www.llku.com\/?p=51","title":{"rendered":"\u83b7\u53d6\u4f9b\u5e94\u5546\u76f8\u5173\u4fe1\u606fSQL"},"content":{"rendered":"<p>\n\tSELECT ASP.VENDOR_ID AS \u4f9b\u5e94\u5546ID,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;ASP.VENDOR_NAME AS \u4f9b\u5e94\u5546\u540d\u79f0,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;ASP.SEGMENT1 AS \u4f9b\u5e94\u5546\u7f16\u53f7,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;DECODE(ASP.VENDOR_TYPE_LOOKUP_CODE,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;EMPLOYEE&#39;,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;\u5458\u5de5\u4f9b\u5e94\u5546&#39;,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#39;\u5916\u90e8\u4f9b\u5e94\u5546&#39;) AS \u4f9b\u5e94\u5546\u7c7b\u578b,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IEB.BANK_NAME AS \u94f6\u884c,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IEB.BANK_BRANCH_NAME AS \u5206\u884c,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IEB.BRANCH_PARTY_ID,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IEB.BANK_ACCOUNT_NUMBER AS \u94f6\u884c\u8d26\u6237,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;(SELECT T.DESCRIPTION<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM FND_FLEX_VALUES_VL T, FND_FLEX_VALUE_SETS S<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE 1 = 1<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND T.FLEX_VALUE_SET_ID = S.FLEX_VALUE_SET_ID<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND S.FLEX_VALUE_SET_NAME LIKE &#39;%COMPANY&#39;<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND T.FLEX_VALUE =<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(SELECT SUBSTR(HOU.SHORT_CODE, 1, 6)<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM HR_OPERATING_UNITS HOU<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE HOU.ORGANIZATION_ID = ASS.ORG_ID)<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND T.ENABLED_FLAG = &#39;Y&#39;<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AND SYSDATE &lt; NVL(T.END_DATE_ACTIVE, SYSDATE + 1)) AS \u4e1a\u52a1\u5b9e\u4f53\u540d\u79f0,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;GCC.SEGMENT3 \u9884\u4ed8\u6b3e\u4f1a\u8ba1\u79d1\u76ee,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;GCC1.SEGMENT3 \u8d1f\u503a\u4f1a\u8ba1\u79d1\u76ee<br \/>\n\t&nbsp; FROM AP_SUPPLIERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ASP,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IBY_EXT_BANK_ACCOUNTS_V &nbsp;IEB,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IBY_EXTERNAL_PAYEES_ALL &nbsp;IEP,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IBY_PMT_INSTR_USES_ALL &nbsp; USES,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;IBY_ACCOUNT_OWNERS &nbsp; &nbsp; &nbsp; IAO,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;AP_SUPPLIER_SITES_ALL &nbsp; &nbsp;ASS,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;GL_CODE_COMBINATIONS_KFV GCC,<br \/>\n\t&nbsp; &nbsp; &nbsp; &nbsp;GL_CODE_COMBINATIONS_KFV GCC1<br \/>\n\t&nbsp;WHERE 1 = 1<br \/>\n\t&nbsp; &nbsp;AND IEP.EXT_PAYEE_ID = USES.EXT_PMT_PARTY_ID<br \/>\n\t&nbsp; &nbsp;AND GCC.CODE_COMBINATION_ID = ASS.PREPAY_CODE_COMBINATION_ID<br \/>\n\t&nbsp; &nbsp;AND GCC1.CODE_COMBINATION_ID = ASS.ACCTS_PAY_CODE_COMBINATION_ID<br \/>\n\t&nbsp; &nbsp;AND IEP.PAYMENT_FUNCTION = &#39;PAYABLES_DISB&#39;<br \/>\n\t&nbsp; &nbsp;AND USES.INSTRUMENT_ID = IEB.EXT_BANK_ACCOUNT_ID<br \/>\n\t&nbsp; &nbsp;AND IEP.PAYEE_PARTY_ID = ASP.PARTY_ID<br \/>\n\t&nbsp; &nbsp;AND ASP.ENABLED_FLAG = &#39;Y&#39;<br \/>\n\t&nbsp; &nbsp;AND ASP.SUMMARY_FLAG = &#39;N&#39;<br \/>\n\t&nbsp; &nbsp;AND IEP.PARTY_SITE_ID IS NULL<br \/>\n\t&nbsp; &nbsp;AND IEP.SUPPLIER_SITE_ID IS NULL<br \/>\n\t&nbsp; &nbsp;AND IEP.ORG_ID IS NULL<br \/>\n\t&nbsp; &nbsp;AND (ASP.END_DATE_ACTIVE IS NULL OR ASP.END_DATE_ACTIVE &gt; SYSDATE)<br \/>\n\t&nbsp; &nbsp;AND (ASS.INACTIVE_DATE IS NULL OR ASS.INACTIVE_DATE &gt; SYSDATE)<br \/>\n\t&nbsp; &nbsp;AND ASS.VENDOR_ID = ASP.VENDOR_ID<br \/>\n\t&nbsp; &nbsp;AND USES.INSTRUMENT_TYPE = &#39;BANKACCOUNT&#39;<br \/>\n\t&nbsp; &nbsp;AND IAO.ACCOUNT_OWNER_PARTY_ID = ASP.PARTY_ID<br \/>\n\t&nbsp; &nbsp;AND IAO.EXT_BANK_ACCOUNT_ID(+) = IEB.EXT_BANK_ACCOUNT_ID<br \/>\n\t&nbsp;ORDER BY ASP.VENDOR_TYPE_LOOKUP_CODE;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SELECT ASP.VENDOR_ID AS \u4f9b\u5e94\u5546ID, &nbsp; &nbsp; &nbsp; &#038;nb &hellip; <a href=\"https:\/\/www.llku.com\/?p=51\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u83b7\u53d6\u4f9b\u5e94\u5546\u76f8\u5173\u4fe1\u606fSQL<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/51"}],"collection":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":3,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}