﻿{"id":486,"date":"2015-05-19T09:40:31","date_gmt":"2015-05-19T01:40:31","guid":{"rendered":"http:\/\/www.llku.com\/?p=486"},"modified":"2015-05-19T11:04:41","modified_gmt":"2015-05-19T03:04:41","slug":"%e8%b5%84%e4%ba%a7%e4%ba%8b%e5%8a%a1%e5%a4%84%e7%90%86%e8%bf%87%e7%a8%8bsql","status":"publish","type":"post","link":"https:\/\/www.llku.com\/?p=486","title":{"rendered":"\u8d44\u4ea7\u4e8b\u52a1\u5904\u7406\u8fc7\u7a0bSQL"},"content":{"rendered":"<p>\n\tSELECT FL.DESCRIPTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u4e8b\u52a1\u5904\u7406\u63cf\u8ff0,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FT.TRANSACTION_TYPE_CODE&nbsp;&nbsp;&nbsp; \u4e8b\u52a1\u5904\u7406\u4ee3\u7801,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FT.TRANSACTION_DATE_ENTERED \u4e8b\u52a1\u5904\u7406\u65f6\u95f4,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FAA.ASSET_NUMBER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8d44\u4ea7\u7f16\u53f7,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FB.ORIGINAL_COST&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u8d44\u4ea7\u539f\u503c,<br \/>\n\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FFV.DESCRIPTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp; FFVS<br \/>\n\t&nbsp;WHERE 1 = 1<br \/>\n\t&nbsp;&nbsp; AND FAA.ASSET_ID = FT.ASSET_ID<br \/>\n\t&nbsp;&nbsp; AND FAT.ASSET_ID = FAA.ASSET_ID<br \/>\n\t&nbsp;&nbsp; AND FB.ASSET_ID = FAA.ASSET_ID<br \/>\n\t&nbsp;&nbsp; AND FD.ASSET_ID = FB.ASSET_ID<br \/>\n\t&nbsp;&nbsp; AND FL.LOOKUP_CODE = FT.TRANSACTION_TYPE_CODE<br \/>\n\t&nbsp;&nbsp; AND FL.LOOKUP_TYPE = &#39;FAXOLTRX&#39;<br \/>\n\t&nbsp;&nbsp; AND (FFV.END_DATE_ACTIVE IS NULL OR FFV.END_DATE_ACTIVE &gt; SYSDATE)<br \/>\n\t&nbsp;&nbsp; AND FFV.ENABLED_FLAG = &#39;Y&#39;<br \/>\n\t&nbsp;&nbsp; AND FFV.FLEX_VALUE_SET_ID = FFVS.FLEX_VALUE_SET_ID<br \/>\n\t&nbsp;&nbsp; AND FFVS.FLEX_VALUE_SET_NAME = &#39;XXXX_COMPANY&#39; &#8211;COA\u673a\u6784\u6bb5<br \/>\n\t&nbsp;&nbsp; AND GCC.CODE_COMBINATION_ID = FD.CODE_COMBINATION_ID<br \/>\n\t&nbsp;&nbsp; AND GCC.SEGMENT1 = FFV.FLEX_VALUE<br \/>\n\t&#8212; AND TO_CHAR(FT.TRANSACTION_DATE_ENTERED, &#39;YYYY-MM-DD&#39;) BETWEEN<br \/>\n\t&#8212;&nbsp;&nbsp;&nbsp; &#39;2014-12-31&#39; AND &#39;2014-12-31&#39;<br \/>\n\t&#8211;AND FT.TRANSACTION_TYPE_CODE = &#39;ADDITION&#39;<br \/>\n\t&nbsp;ORDER BY FFV.FLEX_VALUE, FT.TRANSACTION_DATE_ENTERED ASC;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SELECT FL.DESCRIPTION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#038;nbs &hellip; <a href=\"https:\/\/www.llku.com\/?p=486\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u8d44\u4ea7\u4e8b\u52a1\u5904\u7406\u8fc7\u7a0bSQL<\/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":[7],"tags":[90],"_links":{"self":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/486"}],"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=486"}],"version-history":[{"count":2,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":491,"href":"https:\/\/www.llku.com\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions\/491"}],"wp:attachment":[{"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.llku.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}