{"id":2839,"date":"2018-07-10T16:05:03","date_gmt":"2018-07-10T08:05:03","guid":{"rendered":"https:\/\/www.yclimw.com\/?p=2839"},"modified":"2021-05-31T14:08:40","modified_gmt":"2021-05-31T06:08:40","slug":"oracle%e5%88%97%e8%bd%ac%e8%a1%8c%e7%9a%84%e4%b8%80%e7%a7%8d%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.yclimw.com\/?p=2839","title":{"rendered":"Oracle\u5217\u8f6c\u884c\u7684\u4e00\u79cd\u5b9e\u73b0\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728\u505aOA\u8868\u5355\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u78b0\u5230\u4e00\u4e2a\u5b57\u6bb5\u7528\u9017\u53f7\u6216\u8005\u5176\u4ed6\u5206\u9694\u7b26\u5b58\u591a\u4e2a\u4fe1\u606f\uff0c\u4f8b\u5982\u4e00\u5f20\u8868\u5355\u4e2d\u6709\u4e00\u4e2a\u9644\u4ef6\u63a7\u4ef6\uff0c\u5b58\u50a8\u4e86\u591a\u4e2a\u9644\u4ef6\u7684ID\uff0c\u4e2d\u95f4\u7528\u9017\u53f7\u9694\u5f00\uff0c\u8fd9\u65f6\u5019\u6211\u4eec\u5982\u679c\u8981\u901a\u8fc7\u9644\u4ef6ID\u6293\u53d6\u9644\u4ef6\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982\u679c\u4f7f\u7528LIKE\uff0c\u6548\u7387\u4e0d\u9ad8\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u8fd9\u4e2a\u5b57\u6bb5\u901a\u8fc7\u9017\u53f7\u5206\u9694\u884c\u8f6c\u5217\u3002<\/p>\n<p>\u6ce8\uff1a\u8be5\u65b9\u6cd5\u662f\u5728Oracle\u6570\u636e\u5e93\u4e2d\u5b9e\u73b0\u7684\uff0cSQL Server\u6216\u8005Mysql \u9700\u8981\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<p><!--more-->\u4e0b\u9762\u662f\u5b9e\u73b0\u7684\u793a\u4f8b\uff1a<\/p>\n<p>\u6570\u636e\u683c\u5f0f\u5982\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2840\" src=\"https:\/\/www.yclimw.com\/wp-content\/uploads\/2018\/07\/QQ\u622a\u56fe20180710155926.jpg\" alt=\"QQ\u622a\u56fe20180710155926\" width=\"871\" height=\"608\" srcset=\"https:\/\/www.yclimw.com\/wp-content\/uploads\/2018\/07\/QQ\u622a\u56fe20180710155926.jpg 871w, https:\/\/www.yclimw.com\/wp-content\/uploads\/2018\/07\/QQ\u622a\u56fe20180710155926-150x105.jpg 150w, https:\/\/www.yclimw.com\/wp-content\/uploads\/2018\/07\/QQ\u622a\u56fe20180710155926-300x209.jpg 300w, https:\/\/www.yclimw.com\/wp-content\/uploads\/2018\/07\/QQ\u622a\u56fe20180710155926-768x536.jpg 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/p>\n<p>\u5b9e\u73b0\u4ee3\u7801\uff1a<\/p>\n<pre class=\"lang:plsql decode:true \">SELECT\n\tT.ID,\n\tT.INSTANCEID,\n\tT.TITLE,\n\tT.SNO,\n\tA.ID AS ATTACHID,\n  '\u9644\u4ef6\uff1a'||A.SOURCEFILE AS SOURCEFILE,\n  '0' AS TYPE\nFROM\n(\n\tSELECT\n\t\tDISTINCT\n\t\tID,\n\t\tINSTANCEID,\n\t\tTITLE,\n\t\tSNO,\n\t\tSUBSTR(T.CA,INSTR(T.CA, ',', 1, C.LV) + 1,INSTR(T.CA, ',', 1, C.LV + 1) - (INSTR(T.CA, ',', 1, C.LV) + 1)) AS FUJIAN\n\tFROM\n\t(\n\t\tSELECT\n\t\t\tC.ID,\n\t\t\tC.INSTANCEID,\n\t\t\tC.TITLE,\n\t\t\tC.SNO,\n\t\t\t',' || FUJIAN || ',' AS CA,\n\t\tLENGTH(FUJIAN || ',') - NVL(LENGTH(REPLACE(FUJIAN, ',')), 0) AS CNT\n\t\tFROM\n\t\t\tXMHX_XZ_JSTZTBZZ C\n\t\tWHERE\n\t\t\tFUJIAN IS NOT NULL\n\t) T,\n\t(\n\t\tSELECT\n\t\t\tLEVEL LV\n\t\tFROM\n\t\t\tDUAL CONNECT BY LEVEL &lt;= 50 --\u5176\u4e2d\u201cLEVEL &lt;= 50\u201d\u4e2d\u7684\u6570\u5b5750\u4ee3\u8868\u5339\u914d\u5b57\u6bb5\u5185\u5bb9\u4e2d\u51fa\u73b0\u9017\u53f7\u7684\u6b21\u6570\n\t) C\n) T\nLEFT JOIN EFORM_ATTACH A ON T.FUJIAN=A.ID\nWHERE T.FUJIAN IS NOT NULL<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u505aOA\u8868\u5355\u5f00\u53d1\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u4f1a\u78b0\u5230\u4e00\u4e2a\u5b57\u6bb5\u7528\u9017\u53f7\u6216\u8005\u5176\u4ed6\u5206\u9694\u7b26\u5b58\u591a\u4e2a\u4fe1\u606f\uff0c\u4f8b\u5982\u4e00\u5f20\u8868\u5355\u4e2d\u6709\u4e00\u4e2a\u9644\u4ef6\u63a7\u4ef6\uff0c\u5b58\u50a8\u4e86 &hellip; <a href=\"https:\/\/www.yclimw.com\/?p=2839\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Oracle\u5217\u8f6c\u884c\u7684\u4e00\u79cd\u5b9e\u73b0\u65b9\u6cd5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"aside","meta":{"footnotes":""},"categories":[98],"tags":[339,342],"class_list":["post-2839","post","type-post","status-publish","format-aside","hentry","category-it","tag-oracle","tag-342","post_format-post-format-aside"],"_links":{"self":[{"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/posts\/2839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2839"}],"version-history":[{"count":2,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/posts\/2839\/revisions"}],"predecessor-version":[{"id":2948,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=\/wp\/v2\/posts\/2839\/revisions\/2948"}],"wp:attachment":[{"href":"https:\/\/www.yclimw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yclimw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}