{"id":1028,"date":"2019-06-05T14:09:22","date_gmt":"2019-06-05T06:09:22","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=1028"},"modified":"2019-06-05T14:09:22","modified_gmt":"2019-06-05T06:09:22","slug":"oracle-sql%e5%86%85%e7%bd%ae%e5%87%bd%e6%95%b0%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=1028","title":{"rendered":"Oracle SQL\u5185\u7f6e\u51fd\u6570\u6d4b\u8bd5"},"content":{"rendered":"<p><strong>Oracle SQL\u5185\u7f6e\u51fd\u6570<\/strong><\/p>\n<p>Oracle\u5185\u7f6eSQL\u51fd\u6570\u4e3b\u8981\u5206\u4e3a\u4e00\u4e0b\u7c7b\u522b\uff1a<strong>\u6570\u5b57\u51fd\u6570\u3001\u5b57\u7b26\u51fd\u6570\u3001\u65e5\u671f\u51fd\u6570\u3001\u8f6c\u6362\u51fd\u6570\u3001\u96c6\u5408\u51fd\u6570\u3001\u5206\u6790\/\u805a\u5408\u51fd\u6570<\/strong><\/p>\n<p>\u672c\u624b\u518c\u6240\u6709\u793a\u4f8b\u5747\u4ee5TIPTOP GP 5.10 ERP\u6570\u636e\u5e93\u8868\u4e3a\u57fa\u7840\u6f14\u793a<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1\u3001\u6570\u5b57\u51fd\u6570<\/strong><\/p>\n<p><strong>abs(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u7edd\u5bf9\u503c<\/p>\n<p><strong>ceil(n)<\/strong>\uff1a\u8fd4\u56de&gt;=\u6570\u5b57n\u7684\u6700\u5c0f\u6574\u6570<\/p>\n<p><strong> floor(n)<\/strong>\uff1a\u8fd4\u56de&lt;=\u6570\u5b57n\u7684\u6700\u5927\u6574\u6570<\/p>\n<p><strong>round(n,[m])<\/strong>\uff1a\u56db\u820d\u4e94\u5165\u8fd0\u7b97,\u5982\u679cm\u7f3a\u7701\u5219\u56db\u820d\u4e94\u5165\u5230\u6574\u6570\u4f4d<\/p>\n<p>m&lt;0,\u56db\u820d\u4e94\u5165\u5230\u5c0f\u6570\u70b9\u7684\u524dm\u4f4d,m&gt;0\u56db\u820d\u4e94\u5165\u5230\u5c0f\u6570\u70b9\u7684\u540em\u4f4d<\/p>\n<p><strong>trunc(n,[m])<\/strong>\uff1a\u622a\u53d6\u6570\u5b57,\u5982\u679cm\u7f3a\u7701\u5219\u5c06\u5c0f\u6570\u4f4d\u622a\u53bb<\/p>\n<p>m&lt;0,\u622a\u53d6\u5230\u5c0f\u6570\u70b9\u7684\u524dm\u4f4d,m&gt;0\u622a\u53d6\u5230\u5c0f\u6570\u70b9\u7684\u540em\u4f4d<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;demo\uff1aabs()\u3001ceil()\u3001floor()\u3001trunc()<\/li>\n<li>SELECT\u00a0abs(-2.3),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ceil(-2.6),ceil(2.6),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0floor(-2.6),floor(2.6),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0round(-666.588),round(-666.588,2),round(-666.588,-2),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0trunc(-666.588),trunc(-666.588,2),trunc(-666.588,-2)<\/li>\n<li>\u00a0\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>ABS(-2.3)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a02.3<br \/>\nCEIL(-2.6)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -2<br \/>\nCEIL(2.6)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a03<br \/>\nFLOOR(-2.6)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0-3<br \/>\nFLOOR(2.6)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02<br \/>\nROUND(-666.588)\u00a0\u00a0\u00a0\u00a0\u00a0 -667<br \/>\nROUND(-666.588,2)\u00a0\u00a0 -666.59<br \/>\nROUND(-666.588,-2) \u00a0-700<br \/>\nTRUNC(-666.588)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -666<br \/>\nTRUNC(-666.588,2)\u00a0\u00a0\u00a0 -666.58<br \/>\nTRUNC(-666.588,-2)\u00a0\u00a0 -600<\/p>\n<p>&nbsp;<\/p>\n<p><strong>sqrt(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n(n\u5fc5\u987b\u5927\u4e8e0)\u7684\u5e73\u65b9\u6839<\/p>\n<p><strong>power(n,m)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684m\u6b21\u5e42\uff0c\u5e95\u6570n\u548c\u6307\u6570m\u90fd\u53ef\u4ee5\u662f\u4efb\u610f\u6570\u5b57,\u4f46\u662f\u5982\u679c\u5e95\u6570n\u4e3a\u8d1f\u6570\u5219\u6307\u6570m\u5fc5\u987b\u4e3a\u6b63\u6570<\/p>\n<p><strong>exp(n)<\/strong>\uff1a\u8fd4\u56dee(2.71828183&#8230;.)\u7684n\u6b21\u5e42<\/p>\n<p><strong>ln(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n(n\u5fc5\u987b\u5927\u4e8e0)\u7684\u81ea\u7136\u5bf9\u6570<\/p>\n<p><strong>log(n,m)<\/strong>\uff1a\u8fd4\u56de\u5e95\u6570\u4e3an(\u96640\u53ca1\u7684\u6b63\u6574\u6570)\u7684m(\u4efb\u4f55\u6b63\u6574\u6570)\u5bf9\u6570<\/p>\n<p><strong>mod(n,m)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\/m\u7684\u4f59\u6570,\u5982\u679c\u6570\u5b57m=0\u5219\u8fd4\u56den<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;demo\uff1asqrt(),power(),exp(),ln(),log(),mod()<\/li>\n<li>SELECT\u00a0sqrt(4),power(2,3),exp(1),ln(10),log(2,8),mod(5,2)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>SQRT(4)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a02<br \/>\nPOWER(2,3)\u00a0\u00a0\u00a0\u00a0 8<br \/>\nEXP(1)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.71828182845905<br \/>\nLN(10)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a02.30258509299405<br \/>\nLOG(2,8)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3<br \/>\nMOD(5,2)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a01<\/p>\n<p>&nbsp;<\/p>\n<p><strong>cos(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n(\u5f27\u5ea6\u5355\u4f4d\u8868\u793a\u7684\u89d2\u5ea6\u503c)\u7684\u4f59\u5f26\u503c<\/p>\n<p><strong>cosh(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cc\u66f2\u4f59\u5f26\u503c<\/p>\n<p><strong>acos(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cd\u4f59\u5f26\u503c\uff0c\u6c42\u7684\u7ed3\u679c\u5355\u4f4d\u4e3a\u5f27\u5ea6\uff0cn\u7684\u8303\u56f4\u4e3a -1 &lt; n &lt; 1<\/p>\n<p><strong>sin(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n(\u5f27\u5ea6\u5355\u4f4d\u8868\u793a\u7684\u89d2\u5ea6\u503c)\u7684\u6b63\u5f26\u503c<\/p>\n<p><strong>sinh(n,m)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cc\u66f2\u6b63\u5f26\u503c<\/p>\n<p><strong>asin(n,m)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cd\u6b63\u5f26\u503c\uff0c\u6c42\u7684\u7ed3\u679c\u5355\u4f4d\u4e3a\u5f27\u5ea6\uff0cn\u7684\u8303\u56f4\u4e3a -1 &lt; n &lt; 1<\/p>\n<p><strong>tan(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n(\u5f27\u5ea6\u8868\u793a\u7684\u89d2\u5ea6\u503c)\u7684\u6b63\u5207\u503c<\/p>\n<p><strong>tanh(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cc\u66f2\u6b63\u5207\u503c<\/p>\n<p><strong>atan(n)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\u7684\u53cd\u6b63\u5207\u503c\uff0c\u6c42\u7684\u7ed3\u679c\u5355\u4f4d\u4e3a\u5f27\u5ea6\uff0cn\u7684\u8303\u56f4\u4efb\u610f\u6570\u503c<\/p>\n<p><strong>atan(n,m)<\/strong>\uff1a\u8fd4\u56de\u6570\u5b57n\/m\u7684\u53cd\u6b63\u5207\u503c\uff0c\u6c42\u7684\u7ed3\u679c\u5355\u4f4d\u4e3a\u5f27\u5ea6\uff0c\u4f60\u53ef\u4ee5\u4e3a\u4efb\u610f\u6570\u503c\uff0cm\u4e0d\u53ef\u4e3a0<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u4e09\u89d2\u51fd\u6570\u5e94\u7528demo\uff1a<\/li>\n<li>SELECT\u00a0cos(0.5),cosh(2),acos(1),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sin(0.5),sinh(2),asin(0),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0tan(0.5),tanh(2),atan(8),atan(16\/2)<\/li>\n<li>\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>2\u3001\u5b57\u7b26\u51fd\u6570<\/strong><\/p>\n<p><strong>ascii(n)<\/strong>\uff1a\u8fd4\u56de\u5b57\u7b26c\u7684ascii\u503c<\/p>\n<p><strong>chr(n)<\/strong>\uff1a\u5c06ascii\u503c\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26<\/p>\n<p><strong> initcap(s)<\/strong>\uff1a\u5c06\u5b57\u7b26\u4e32s\u6240\u6709\u7684\u5355\u8bcd(\u4f9d\u7a7a\u683c\u6216\u975e\u5b57\u6bcd\u5b57\u7b26\u5212\u5206\u5355\u8bcd\u533a\u95f4)\u7684\u9996\u5b57\u6bcd\u5927\u5199,\u5176\u4f59\u5c0f\u5199<\/p>\n<p><strong>lower(s)<\/strong>\uff1a\u5c06\u5b57\u7b26\u4e32s\u4e2d\u6240\u6709\u7684\u5b57\u7b26\u8f6c\u6362\u4e3a\u5c0f\u5199<\/p>\n<p><strong>upper(s)<\/strong>\uff1a\u5c06\u5b57\u7b26\u4e32s\u4e2d\u6240\u6709\u7684\u5b57\u7b26\u8f6c\u6362\u4e3a\u5927\u5199<\/p>\n<p><strong>concat(s1,s2)<\/strong>\uff1a\u5c06\u5b57\u7b26\u4e32s2\u8fde\u63a5\u5728s1\u540e\u9762\uff0c\u7b49\u540c\u4e8e\u64cd\u4f5c\u7b26||<\/p>\n<p><strong>length(s)<\/strong>\uff1a\u5c06\u8fd4\u56de\u5b57\u4e32s\u7684\u957f\u5ea6\uff0c\u8fd4\u56de\u7684\u957f\u5ea6\u5305\u62ec\u5176\u4e2d\u7684\u6240\u6709\u7a7a\u683c(\u5c3e\u90e8\u7a7a\u683c\u4e5f\u7b97)\uff1b\u5982\u679cs\u4e3anull\uff0c\u5219\u8fd4\u56denull<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u5b57\u7b26\u51fd\u6570demo\uff1a<\/li>\n<li>SELECT\u00a0ascii(&#8216;A&#8217;),chr(65),concat(&#8216;Hello&#8217;,&#8217;World&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0initcap(&#8216;hello\u00a0woRld&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0lower(&#8216;HeLLo\u00a0woRld&#8217;),upper(&#8216;HeLLo\u00a0woRld&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0length(&#8216;HeLLo\u00a0woRld&#8217;),length(&#8216;\u674e\u827a\u8f89&#8217;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>ASCII(&#8216;A&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 65<br \/>\nCHR(65)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0A<br \/>\nCONCAT(&#8216;HELLO&#8217;,&#8217;WORLD&#8217;) \u00a0HelloWorld<br \/>\nINITCAP(&#8216;HELLOWORLD&#8217;)\u00a0\u00a0\u00a0\u00a0 Hello World<br \/>\nLOWER(&#8216;HELLOWORLD&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0 hello world<br \/>\nUPPER(&#8216;HELLOWORLD&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HELLO WORLD<br \/>\nLENGTH(&#8216;HELLOWORLD&#8217;)\u00a0\u00a0\u00a0 \u00a011<br \/>\nLENGTH(&#8216;\u674eYI\u8f89&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4<\/p>\n<p>&nbsp;<\/p>\n<p><strong>lpad(s1,n,s2)<\/strong>\uff1a\u5728\u5b57\u4e32s1\u7684\u5de6\u7aef\u586b\u5145\u5b57\u4e32s2\uff0c\u76f4\u81f3\u586b\u5145\u540e\u7684s1\u7684\u603b\u957f\u5ea6\u4e3an<\/p>\n<p>\u5982\u679c\u4e0d\u6307\u5b9as2\u5219\u9ed8\u8ba4\u4e3a\u7a7a\u683c<\/p>\n<p>\u5982\u679cs1\u7684\u957f\u5ea6&gt;n\uff0c\u5219\u76f4\u63a5\u8fd4\u56des1\u5de6\u7aef\u7684n\u4e2a\u5b57\u7b26<\/p>\n<p><strong>rpad(s1,n,s2)<\/strong>\uff1a\u5728\u5b57\u4e32s1\u7684\u53f3\u7aef\u586b\u5145\u5b57\u4e32s2\uff0c\u76f4\u81f3\u586b\u5145\u540e\u7684s1\u7684\u603b\u957f\u5ea6\u4e3an<\/p>\n<p>\u5982\u679c\u4e0d\u6307\u5b9as2\u5219\u9ed8\u8ba4\u4e3a\u7a7a\u683c<\/p>\n<p>\u5982\u679cs1\u7684\u957f\u5ea6&gt;n\uff0c\u5219\u76f4\u63a5\u8fd4\u56des1\u5de6\u7aef\u7684n\u4e2a\u5b57\u7b26<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;lpad\u3001rpad<\/li>\n<li>SELECT\u00a0lpad(&#8216;a&#8217;,10,&#8217;8&#8242;),lpad(&#8216;LaaaaaaR&#8217;,6,&#8217;8&#8242;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rpad(&#8216;a&#8217;,10,&#8217;8&#8242;),rpad(&#8216;LaaaaaaR&#8217;,6,&#8217;8&#8242;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>lpad(&#8216;a&#8217;,10,&#8217;8&#8242;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 888888888a<br \/>\nlpad(&#8216;laaaaaar&#8217;,6,&#8217;8&#8242;)\u00a0\u00a0 \u00a0 laaaaa<br \/>\nrpad(&#8216;a&#8217;,10,&#8217;8&#8242;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 a888888888<br \/>\nrpad(&#8216;laaaaaar&#8217;,6,&#8217;8&#8242;)\u00a0\u00a0\u00a0 \u00a0laaaaa<\/p>\n<p>&nbsp;<\/p>\n<p><strong>instr(s1,s2,n,m)<\/strong>\uff1a\u53d6\u5f97\u5b50\u4e32s2\u5728\u5b57\u4e32s1\u4e2d\u7684\u4f4d\u7f6e<\/p>\n<p>n\u8868\u793a\u5728s1\u4e2d\u5f00\u59cb\u641c\u7d22\u7684\u4f4d\u7f6e\uff0cm\u8868\u793a\u5b57\u4e32s2\u51fa\u73b0\u7684\u6b21\u6570<\/p>\n<p>\u5982\u679cn\u4e3a\u8d1f\u6570\uff0c\u5219\u8868\u793a\u4ece\u5c3e\u90e8\u5f00\u59cb\u641c\u7d22\uff0cn\u4e0em\u9ed8\u8ba4\u4e3a1<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0instr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,1,1)\u00a0,instr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,1,2),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0instr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,-1,1),instr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,-1,2)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>instr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,1,1)\u00a0\u00a0\u00a0 \u00a04<br \/>\ninstr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,-1,1)\u00a0\u00a0\u00a0 9<br \/>\ninstr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,1,2)\u00a0\u00a0\u00a0\u00a0 9<br \/>\ninstr(&#8216;888terryterry&#8217;,&#8217;terry&#8217;,-1,2)\u00a0\u00a0\u00a0 4<\/p>\n<p>&nbsp;<\/p>\n<p><strong>substr(s1,m,n)<\/strong>\uff1a\u53d6\u5f97\u5b57\u4e32s1\u4ecem\u5f00\u59cb\uff0c\u957f\u5ea6\u4e3an\u7684\u5b50\u4e32\uff0cm&gt;0\u8868\u793a\u4ece\u5934\u5f00\u59cb\u641c\u7d22\uff0cm&lt;0\u8868\u793a\u4ece\u5c3e\u5f00\u59cb<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0substr(&#8216;\u674e\u85dd\u8f1d&#8217;,1,2),substr(&#8216;terry&#8217;,-4,3)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>substr(&#8216;\u674e\u85dd\u8f1d&#8217;,1,2)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u674e\u85dd<br \/>\nsubstr(&#8216;terry&#8217;,-4,3)\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0err<\/p>\n<p>&nbsp;<\/p>\n<p><strong>ltrim(s1,set)<\/strong>\uff1a\u4ece\u5de6\u7aef\u5f00\u59cb\u9010\u4e00\u53d6\u5f97\u5b57\u4e32s1\u5de6\u7aef\u5305\u542b\u7684set\u4e2d\u7684\u4efb\u4f55\u5b57\u7b26<\/p>\n<p>\u5f53\u9047\u5230\u4e0d\u662fset\u4e2d\u7684\u5b57\u7b26\u662f\uff0c\u5219\u7ed3\u675f\u5e76\u8fd4\u56de\u5269\u4f59\u7ed3\u679c<\/p>\n<p><strong>rtrim(s1,set)<\/strong>\uff1a\u4ece\u53f3\u7aef\u5f00\u59cb\u9010\u4e00\u53d6\u5f97\u5b57\u4e32s1\u53f3\u7aef\u5305\u542b\u7684set\u4e2d\u7684\u4efb\u4f55\u5b57\u7b26<\/p>\n<p>\u5f53\u9047\u5230\u4e0d\u662fset\u4e2d\u7684\u5b57\u7b26\u662f\uff0c\u5219\u7ed3\u675f\u5e76\u8fd4\u56de\u5269\u4f59\u7ed3\u679c<\/p>\n<p><strong>trim(c FROM s2)<\/strong>\uff1a\u4ece\u5b57\u4e32s2\u7684\u5934\u90e8\u3001\u5c3e\u90e8\u3001\u6216\u4e24\u7aef\u622a\u53bb\u5b57\u7b26c\uff08c\u53ea\u80fd\u591f\u662f\u4e00\u4e2a\u5b57\u7b26\uff09<\/p>\n<p>\u5f53\u9047\u5230\u4e0d\u662fset\u4e2d\u7684\u5b57\u7b26\u662f\uff0c\u5219\u7ed3\u675f\u5e76\u8fd4\u56de\u5269\u4f59\u7ed3\u679c<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0ltrim(&#8216;terry&#8217;,&#8217;t&#8217;),ltrim(&#8216;terry&#8217;,&#8217;ter&#8217;),ltrim(&#8216;terry&#8217;,&#8217;e&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0rtrim(&#8216;terry&#8217;,&#8217;y&#8217;),rtrim(&#8216;terry&#8217;,&#8217;ry&#8217;),rtrim(&#8216;terry&#8217;,&#8217;yre&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0trim(&#8216;e&#8217;\u00a0from\u00a0&#8216;terry&#8217;),trim(&#8216;t&#8217;\u00a0from\u00a0&#8216;terry&#8217;),trim(&#8216;y&#8217;\u00a0from\u00a0&#8216;terryy&#8217;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>ltrim(&#8216;terry&#8217;,&#8217;t&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 erry<br \/>\nltrim(&#8216;terry&#8217;,&#8217;ter&#8217;)\u00a0\u00a0\u00a0\u00a0 y<br \/>\nltrim(&#8216;terry&#8217;,&#8217;e&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 terry<br \/>\nrtrim(&#8216;terry&#8217;,&#8217;y&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 terr<br \/>\nrtrim(&#8216;terry&#8217;,&#8217;ry&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0 te<br \/>\nrtrim(&#8216;terry&#8217;,&#8217;yre&#8217;)\u00a0\u00a0\u00a0 t<br \/>\ntrim(&#8216;e&#8217;from&#8217;terry&#8217;)\u00a0 terry<br \/>\ntrim(&#8216;t&#8217;from&#8217;terry&#8217;) \u00a0 erry<br \/>\ntrim(&#8216;y&#8217;from&#8217;terryy&#8217;)\u00a0terr<\/p>\n<p>&nbsp;<\/p>\n<p><strong>replace(s1,s2,s3)<\/strong>\uff1a\u5c06s1\u5b57\u4e32\u4e2d\u7684\u5b50\u4e32s2\u7528s3\u66ff\u4ee3\uff0c\u5982\u679cs2\u4e3anull\u5219\u8fd4\u56de\u539f\u6765\u7684\u5b57\u4e32s1<\/p>\n<p>\u6ce8\u610f\uff1a\u5982\u679cs3\u4e3anull\uff0c\u5219\u4f1a\u53bb\u6389\u5b50\u4e32s2<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0replace(&#8216;\u674e\u85dd\u8f1d-TERRY&#8217;,&#8217;\u674e\u85dd\u8f1d&#8217;,&#8217;\u8af8\u845b\u9322\u597d&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0replace(&#8216;\u674e\u85dd\u8f1d-TERRY&#8217;,&#8217;\u674e\u85dd\u8f1d&#8217;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>replace(&#8216;\u674e\u85dd\u8f1d-TERRY&#8217;,&#8217;\u674e\u85dd\u8f1d&#8217;,&#8217;\u8af8\u845b\u9322\u597d&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u8af8\u845b\u9322\u597d-TERRY<br \/>\nreplace(&#8216;\u674e\u85dd\u8f1d-TERRY&#8217;,&#8217;\u674e\u85dd\u8f1d&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -TERRY<\/p>\n<p>&nbsp;<\/p>\n<p><strong>translate(s1,froms,tos)<\/strong>\uff1a\u5c06\u5b57\u7b26\u4e32s1\u6309\u7167froms\u548ctos\u7684\u5bf9\u5e94\u5173\u7cfb\u8fdb\u884c\u8f6c\u6362<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0translate(&#8216;terry&#8217;,&#8217;abcdefgxyz&#8217;,&#8217;8888888666&#8242;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>translate(&#8216;terry&#8217;,&#8217;abcdefgxyz&#8217;,&#8217;8888888666&#8242;)\u00a0\u00a0\u00a0\u00a0 \u00a0t8rr6<\/p>\n<p>&nbsp;<\/p>\n<p><strong>regexp_substr(s1,pattern,position,occurrence,match_parameter)<\/strong>\uff1a<\/p>\n<p>\u6309\u7167\u6b63\u5219\u8868\u8fbe\u5f0fpattern\u4eces1\u5b57\u4e32\u4e2d\u7684position\u4f4d\u7f6e\u5f00\u59cb<\/p>\n<p>\u622a\u53d6\u7b2coccurrence\u6b21\u51fa\u73b0\u7684\u5339\u914dpattern\u7684\u5b57\u4e32\uff0cmatche_parameter\u4e3a\u9ed8\u8ba4\u5339\u914d\u7684\u6587\u672c<\/p>\n<p>position\uff0coccurrence\uff0cmatche_parameter \u9ed8\u8ba4\u4e3a1,1,&#8221; &#8221;<\/p>\n<p><strong>regexp_replace(s1,pattern,position,occurrence,match_parameter)<\/strong>\uff1a<\/p>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u6269\u5c55replace\u7684\u529f\u80fd,\u7528\u4e8e\u6309\u7167\u7279\u5b9a\u7684\u8868\u8fbe\u5f0fpattern\u7684\u89c4\u5219\u66ff\u6362\u5b57\u4e32\u4e32s1<\/p>\n<p>s1\u6307\u5b9a\u66ff\u6362\u5b57\u7b26\u4e32\uff0cposition\u6307\u5b9a\u8d77\u59cb\u641c\u7d22\u4f4d\u7f6e<\/p>\n<p>occurrence\u6307\u5b9a\u66ff\u6362\u51fa\u73b0\u7684\u7b2cn\u4e2a\u5b57\u7b26\u4e32<\/p>\n<p>matche_parameter\u6307\u5b9a\u9ed8\u8ba4\u5339\u914d\u64cd\u4f5c\u7684\u6587\u672c\u4e32<\/p>\n<p><strong>regexp_like()<\/strong>\uff1a\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6269\u5c55\u540e\u7684like<\/p>\n<p><strong>regexp_instr()<\/strong>\uff1a\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6269\u5c55\u540e\u7684instr<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0regexp_substr(&#8216;\u6211\u7684\u90f5\u7bb1yihuiworld@126.com&#8217;,'[[:lower:]]{1,}+@{1}+[[:alnum:]]{1,}+\\.{1}+[[:alpha:]]{1,}&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0regexp_replace(&#8216;\u9019\u500b\u5c4chttp:\/\/www.space.com.tw\/product&#8217;,&#8217;http:\/\/([[:alnum:]]+\\.?){3,4}+[[:print:]]{1,}&#8217;,&#8217;www.terry.com&#8217;)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>regexp_substr(&#8216;\u6211\u7684\u90f5\u7bb1<a href=\"mailto:yihuiworld@126.com','[[:lower:]]{1,}+@{1}+[[:alnum:]]{1,}+\\\\.{1}+[[:alpha:]]{1,}'\">yihuiworld@126.com&#8217;,'[[:lower:]]{1,}+@{1}+[[:alnum:]]{1,}+\\.{1}+[[:alpha:]]{1,}&#8217;<\/a>)<\/p>\n<p>&#8211;\u7ed3\u679c:\u00a0\u00a0 <a href=\"mailto:yihuiworld@126.com\">yihuiworld@126.com<\/a><\/p>\n<p>regexp_replace(&#8216;\u9019\u500b\u5c4c<a href=\"http:\/\/www.space.com.tw\/product','http:\/\/([[:alnum:]]+\\\\.?){3,4}+[[:print:]]{1,}','www.terry.com'\">http:\/\/www.space.com.tw\/product&#8217;,&#8217;http:\/\/([[:alnum:]]+\\.?){3,4}+[[:print:]]{1,}&#8217;,&#8217;www.terry.com&#8217;<\/a>)<\/p>\n<p>&#8211;\u7ed3\u679c\uff1a\u9019\u500b\u5c4c<a href=\"http:\/\/www.terry.com\">www.terry.com<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>3\u3001\u65e5\u671f\u51fd\u6570<\/strong><\/p>\n<p><strong>sysdate<\/strong>\uff1a\u8fd4\u56de\u7cfb\u7edf\u5f53\u524d\u65e5\u671f\u65f6\u95f4<\/p>\n<p><strong>systimestamp<\/strong>\uff1a\u8fd4\u56de\u7cfb\u7edf\u5f53\u524d\u65e5\u671f\u65f6\u95f4\u548c\u65f6\u533a<\/p>\n<p><strong>current_date<\/strong>\uff1a\u8fd4\u56de\u5f53\u524d\u56de\u8bdd\u65f6\u533a\u6240\u5bf9\u5e94\u7684\u65e5\u671f\u548c\u65f6\u95f4<\/p>\n<p><strong>current_timestamp<\/strong>\uff1a\u8fd4\u56de\u5f53\u524d\u56de\u8bdd\u65f6\u533a\u6240\u5bf9\u5e94\u7684\u65e5\u671f\u65f6\u95f4<\/p>\n<p><strong>localtimestamp<\/strong>\uff1a\u8fd4\u56de\u5f53\u524d\u56de\u8bdd\u65f6\u533a\u6240\u5bf9\u5e94\u7684\u65e5\u671f\u65f6\u95f4<\/p>\n<p><strong>systimestamp<\/strong>\uff1a\u8fd4\u56de\u7cfb\u7edf\u5f53\u524d\u65e5\u671f\u65f6\u95f4\u548c\u65f6\u533a<\/p>\n<p><strong>sessiontimezone<\/strong>\uff1a\u8fd4\u56de\u5f53\u524d\u56de\u8bdd\u6240\u5728\u7684\u65f6\u533a<\/p>\n<p><strong>dbtimezone<\/strong>\uff1a\u8fd4\u56de\u8d44\u6599\u5e93\u6240\u5728\u7684\u65f6\u533a<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0sysdate,systimestamp,current_date,current_timestamp,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0localtimestamp,sessiontimezone,dbtimezone<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>SYSDATE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/25 13:29:38<br \/>\nSYSTIMESTAMP\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 25-3\u6708 -15 01.29.38.867634 \u4e0b\u5348 +08:00<br \/>\nCURRENT_DATE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/25 13:29:38<br \/>\nCURRENT_TIMESTAMP\u00a0\u00a0\u00a0\u00a0\u00a0 25-3\u6708 -15 01.29.38.867641 \u4e0b\u5348 +08:00<br \/>\nLOCALTIMESTAMP\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 25-3\u6708 -15 01.29.38.867641 \u4e0b\u5348<br \/>\nSESSIONTIMEZONE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 +08:00<br \/>\nDBTIMEZONE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 +08:00<\/p>\n<p>&nbsp;<\/p>\n<p><strong>add_months(d,n)<\/strong>\uff1a\u8fd4\u56de\u6307\u5b9a\u65e5\u671fd\u4e4b\u540e(\u6216\u524d)\u7684n\u500b\u6708\u6240\u5c0d\u61c9\u7684\u65e5\u671f\u6642\u9593;n&gt;0\uff1a\u4e4b\u540e\uff0cn&lt;0\uff1a\u4e4b\u524d<\/p>\n<p><strong>extract()<\/strong>\uff1a\u7528\u65bc\u5f9e\u7279\u5b9a\u7684\u65e5\u671f\u6642\u9593\u503c\u91cc\u53d6\u51fa\u6240\u9700\u8981\u7684\u7279\u5b9a\u6578\u64da(\u5982\u65e5\u671f\u3001\u6708\u4efd\u3001\u65e5\u3001\u6642\u9593\u7b49)<\/p>\n<p><strong>last_day(d)\uff1a<\/strong>\u7528\u65bc\u8fd4\u56de\u6307\u5b9a\u65e5\u671f\u6240\u5728\u6708\u4efd\u7684\u6700\u5f8c\u4e00\u5929<\/p>\n<p><strong>next_day(d,char)\uff1a<\/strong>\u8fd4\u56de\u6307\u5b9a\u65e5\u671f\u540e\u7684\u4e00\u500b\u5de5\u4f5c\u65e5(\u7531char\u6307\u5b9a)\u6240\u5c0d\u61c9\u7684\u65e5\u524d<\/p>\n<p><strong>round(d[,fmt])\uff1a<\/strong>\u8fd4\u56de\u65e5\u671f\u6642\u9593\u7684\u56db\u820d\u4e94\u5982\u7d50\u679c\uff0c\u5982\u679cfmt\u6307\u5b9a\u5e74\u5ea6\u52477\u67081\u65e5\u70ba\u5206\u754c\u7dda<br \/>\n\u5982\u679cfmt\u6307\u5b9a\u6708\u524716\u65e5\u70ba\u5206\u754c\u7dda\uff0c\u5982\u679cfmt\u6307\u5b9a\u5929\u5247\u4e2d\u534812:00\u70ba\u5206\u754c\u7dda<\/p>\n<p><strong>trunc(d[,fmt])\uff1a<\/strong>\u7528\u65bc\u622a\u65b7\u65e5\u671f\u6642\u9593\u6578\u64da\uff0c\u5982\u679cfmt\u6307\u5b9a\u5e74\u5ea6\u5247\u7d50\u679c\u70ba\u672c\u5e74\u76841\u67081\u65e5<br \/>\n\u5982\u679cfmt\u6307\u5b9a\u6708\u5247\u7d50\u679c\u70ba\u672c\u67081\u65e5\uff0c\u5982\u679cfmt\u7a7a\u5247\u7d50\u679c\u70ba\u622a\u53d6\u65e5\u671f\u6642\u9593\u6578\u64da\u4e2d\u7684\u65e5\u671f<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>SELECT\u00a0sysdate,add_months(sysdate,4),add_months(sysdate,-4),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0extract(MONTH\u00a0from\u00a0sysdate),last_day(sysdate),next_day(sysdate,&#8217;\u661f\u671f\u4e00&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0round(sysdate,&#8217;YEAR&#8217;),round(sysdate,&#8217;MONTH&#8217;),round(sysdate,&#8217;DAY&#8217;),round(sysdate),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0trunc(sysdate,&#8217;YEAR&#8217;),trunc(sysdate,&#8217;MONTH&#8217;),trunc(sysdate,&#8217;DAY&#8217;),trunc(sysdate)<\/li>\n<li>\u00a0\u00a0FROM\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>SYSDATE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a02015\/3\/25 13:40:14<br \/>\nADD_MONTHS(SYSDATE,4)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02015\/7\/25 13:40:14<br \/>\nADD_MONTHS(SYSDATE,-4)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2014\/11\/25 13:40:14<br \/>\nEXTRACT(MONTHFROMSYSDATE)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3<br \/>\nLAST_DAY(SYSDATE)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/31 13:40:14<br \/>\nNEXT_DAY(SYSDATE,&#8217;\u661f\u671f\u4e00&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/30 13:40:14<br \/>\nROUND(SYSDATE,&#8217;YEAR&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02015\/1\/1<br \/>\nROUND(SYSDATE,&#8217;MONTH&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/4\/1<br \/>\nROUND(SYSDATE,&#8217;DAY&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/29<br \/>\nROUND(SYSDATE)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02015\/3\/26<br \/>\nTRUNC(SYSDATE,&#8217;YEAR&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/1\/1<br \/>\nTRUNC(SYSDATE,&#8217;MONTH&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/1<br \/>\nTRUNC(SYSDATE,&#8217;DAY&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/22<br \/>\nTRUNC(SYSDATE)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2015\/3\/25<\/p>\n<p>&nbsp;<\/p>\n<p><strong>to_timestamp(chr[fmt[,nls_param]])<\/strong>\uff1a\u5c07\u7b26\u5408\u7279\u5b9a\u65e5\u671f\u548c\u6642\u9593\u6309\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u8f49\u8b8a\u70baTIMESTAMP\u985e\u578b<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u67e5\u8a62\u00a02015-03-25\u00a011:30:00\u00a0\u6642\u9593\u9ede\u6642\u00a0oay_file\u00a0\u8a18\u9304\u00a0[\u65f6\u95f4\u6413\u4e0d\u80fd&gt;\u5f53\u524d\u65f6\u95f4\u70b9\u00a0\u4e14\u00a0\u4e0d\u80fd\u592a\u65e9]<\/li>\n<li>select\u00a0*\u00a0from\u00a0oay_file\u00a0as\u00a0of\u00a0timestamp\u00a0to_timestamp(&#8216;2015-03-25\u00a011:30:00&#8242;,&#8217;YYYY-MM-DD\u00a0HH24:MI:SS&#8217;)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>month_between(d1,d2)<\/strong>\uff1a\u8fd4\u56de\u65e5\u671fd1\u8207d2\u4e4b\u9593\u76f8\u5dee\u7684\u6708\u4efd\u6578<\/p>\n<p>\u5982\u679cd1&lt;d2\u5247\u8fd4\u56de\u8ca0\u6578\uff0c\u5982\u679cd1\u548cd2\u7684\u5929\u6578\u76f8\u540c\u6216\u90fd\u662f\u6708\u5e95\u5247\u8fd4\u56de\u6574\u6578,\u5426\u5247oracle\u4ee5\u6bcf\u670831\u5929\u70ba\u6e96\u4f86\u8a08\u7b97\u7d50\u679c\u7684\u5c0f\u6578\u90e8\u4efd<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0sysdate,months_between(sysdate,to_date(&#8216;2012\/06\/30&#8242;,&#8217;YYYY\/MM\/DD&#8217;))<\/li>\n<li>\u00a0\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>SYSDATE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a02015\/3\/25 13:49:40<br \/>\nMONTHS_BETWEEN(SYSDATE,TO_DATE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 32.8572954002389<\/p>\n<p>&nbsp;<\/p>\n<p><strong>4\u3001\u6570\u636e\u5e93\u7cfb\u7edf\u76f8\u5173\u914d\u7f6e<\/strong><\/p>\n<p><strong>sys_context(context,attribute)<\/strong>\uff1a\u8fd4\u56de\u61c9\u7528\u4e0a\u4e0b\u6587\u7279\u5b9a\u5c6c\u6027\uff0c\u5176\u4e2dcontext\u6307\u5b9a\u61c9\u7528\u4e0a\u4e0b\u6587\u540d\uff0cattribute\u6307\u5b9a\u5c0d\u61c9\u7684\u5c6c\u6027<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;TERMINAL&#8217;)\u00a0terminal,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;LANGUAGE&#8217;)\u00a0language,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;SESSIONID&#8217;)\u00a0sessionid,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;INSTANCE&#8217;)\u00a0instance,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;ENTRYID&#8217;)\u00a0entryid,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;ISDBA&#8217;)\u00a0isdba,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_TERRITORY&#8217;)\u00a0nls_territory,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_CURRENCY&#8217;)\u00a0nls_currency,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_CALENDAR&#8217;)\u00a0nls_calendar,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_DATE_FORMAT&#8217;)\u00a0nls_date_format,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_DATE_LANGUAGE&#8217;)\u00a0nls_date_language,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NLS_SORT&#8217;)\u00a0nls_sort,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;CURRENT_USER&#8217;)\u00a0current_user,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;CURRENT_USERID&#8217;)\u00a0current_userid,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;SESSION_USER&#8217;)\u00a0session_user,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;SESSION_USERID&#8217;)\u00a0session_userid,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;PROXY_USER&#8217;)\u00a0proxy_user,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;PROXY_USERID&#8217;)\u00a0proxy_userid,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;DB_DOMAIN&#8217;)\u00a0db_domain,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;DB_NAME&#8217;)\u00a0db_name,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;HOST&#8217;)\u00a0host,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;OS_USER&#8217;)\u00a0os_user,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;EXTERNAL_NAME&#8217;)\u00a0external_name,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;IP_ADDRESS&#8217;)\u00a0ip_address,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;NETWORK_PROTOCOL&#8217;)\u00a0network_protocol,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;BG_JOB_ID&#8217;)\u00a0bg_job_id,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;FG_JOB_ID&#8217;)\u00a0fg_job_id,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;AUTHENTICATION_TYPE&#8217;)\u00a0authentication_type,<\/li>\n<li>\u00a0\u00a0\u00a0SYS_CONTEXT(&#8216;USERENV&#8217;,&#8217;AUTHENTICATION_DATA&#8217;)\u00a0authentication_data<\/li>\n<li>\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>TERMINAL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 PCS13098<br \/>\nLANGUAGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SIMPLIFIED CHINESE_CHINA.AL32UTF8<br \/>\nSESSIONID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 26273213<br \/>\nINSTANCE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a01<br \/>\nENTRYID<br \/>\nISDBA\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FALSE<br \/>\nNLS_TERRITORY\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0CHINA<br \/>\nNLS_CURRENCY\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0RMB<br \/>\nNLS_CALENDAR\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 GREGORIAN<br \/>\nNLS_DATE_FORMAT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DD-MON-RR<br \/>\nNLS_DATE_LANGUAGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SIMPLIFIED CHINESE<br \/>\nNLS_SORT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 BINARY<br \/>\nCURRENT_USER\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0SZPF<br \/>\nCURRENT_USERID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a055<br \/>\nSESSION_USER\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0SZPF<br \/>\nSESSION_USERID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 55<br \/>\nPROXY_USER<br \/>\nPROXY_USERID<br \/>\nDB_DOMAIN<br \/>\nDB_NAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0topprod<br \/>\nHOST\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DOMAIN\\PCS13098<br \/>\nOS_USER\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 terrylee<br \/>\nEXTERNAL_NAME<br \/>\nIP_ADDRESS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0192.168.5.227<br \/>\nNETWORK_PROTOCOL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0tcp<br \/>\nBG_JOB_ID<br \/>\nFG_JOB_ID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nAUTHENTICATION_TYPE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DATABASE<br \/>\nAUTHENTICATION_DATA<\/p>\n<p>&nbsp;<\/p>\n<p><strong>UID<\/strong>\uff1a\u8fd4\u56de\u7576\u524d\u6703\u8a71\u7528\u6236\u7684ID\u865f<br \/>\n<strong>USER<\/strong>\uff1a\u8fd4\u56de\u7576\u524d\u6703\u8a71\u6240\u5c0d\u61c9\u8cc7\u6599\u5eab\u7528\u6236\u540d<br \/>\n<strong>USERENV(parameter)<\/strong>\uff1a\u8fd4\u56de\u7576\u524d\u6703\u8a71\u4e0a\u4e0b\u6587\u7684\u5c6c\u6027\u4fe1\u606f<br \/>\n\u5176\u4e2dparameter\u53ef\u53d6\u503c:ISDBA\u3001LANGUAGE\u3001TERMINAL\u3001CLIENT_INFO<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0uid,user,userenv(&#8216;ISDBA&#8217;)\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>UID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 55<br \/>\nUSER\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SZPF<br \/>\nUSERENV(&#8216;ISDBA&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FALSE<\/p>\n<p>&nbsp;<\/p>\n<p><strong>sys_guid()<\/strong>\uff1a\u7528\u65bc\u751f\u6210\u985e\u578b\u70baRAW\u768416\u5b57\u7bc0\u7684\u552f\u4e00\u6a19\u8b58\u7b26,\u6bcf\u6b21\u8abf\u7528\u8a72\u51fd\u6578\u90fd\u6703\u751f\u6210\u4e0d\u540c\u7684RAW\u6578\u64da<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0sys_guid(),sys_guid()\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>SYS_GUID()\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1217A841ED2B6437E0530900A8C0B6F8<br \/>\nSYS_GUID()\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1217A841ED2C6437E0530900A8C0B6F8<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5\u3001\u590d\u6742\u5355\u884c\u51fd\u6570<\/strong><\/p>\n<p><strong>coalesce(expr1[,expr2]&#8230;)<\/strong>\uff1a\u8fd4\u56de\u904b\u7b97\u5f0f\u4e2d\u7b2c\u4e00\u500bnot null\u904b\u7b97\u5f0f\u7684\u7d50\u679c<\/p>\n<p><strong>decode(expr,search1,result[,search2,result2,..][,default])<\/strong>\uff1a\u8fd4\u56de\u5339\u914d\u4e8e\u7279\u5b9a\u904b\u7b97\u5f0f\u7684\u7d50\u679c<\/p>\n<p>\u5982\u679csearch1\u5339\u914dexpr\u5247\u8fd4\u56deresult1\uff0c\u5982\u679c\u5982\u679csearch2\u5339\u914dexpr\u5247\u8fd4\u56deresult2<br \/>\n\u4f9d\u6b21\u985e\u63a8\uff0c\u5982\u679c\u6c92\u6709\u4efb\u4f55\u5339\u914d\u95dc\u4fc2\u5247\u8fd4\u56dedefault<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0coalesce(&#8221;,&#8221;,&#8217;terry&#8217;,&#8217;zhanna&#8217;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0decode(&#8216;M&#8217;,&#8217;W&#8217;,&#8217;girl&#8217;,&#8217;M&#8217;,&#8217;boy&#8217;,&#8217;person&#8217;)<\/li>\n<li><\/li>\n<li>\u00a0\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>coalesce(&#8221;,&#8221;,&#8217;terry&#8217;,&#8217;zhanna&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 terry<br \/>\ndecode(&#8216;M&#8217;,&#8217;W&#8217;,&#8217;girl&#8217;,&#8217;M&#8217;,&#8217;boy&#8217;,&#8217;person&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0boy<\/p>\n<p>&nbsp;<\/p>\n<p><strong>greatest(expr1[,expr2]&#8230;)\uff1a<\/strong>\u8fd4\u56de\u5217\u8868\u904b\u7b97\u5f0fexpr1,expr2,&#8230;\u4e2d\u503c\u6700\u5927\u7684\u4e00\u500b<br \/>\n\u5728\u6bd4\u8f03\u4e4b\u524d\uff0cexpr2\u7b49\u9805\u6703\u88ab\u96b1\u542b\u5730\u8f49\u63db\u70baexpr1\u7684\u6642\u5019\u64da\u985e\u578b<\/p>\n<p><strong>least(expr1[,expr2]&#8230;)\uff1a<\/strong>\u8fd4\u56de\u5217\u8868\u904b\u7b97\u5f0fexpr1,expr2,&#8230;\u4e2d\u503c\u6700\u5c0f\u7684\u4e00\u500b<br \/>\n\u5728\u6bd4\u8f03\u4e4b\u524d\uff0cexpr2\u7b49\u9805\u6703\u88ab\u96b1\u542b\u5730\u8f49\u63db\u70baexpr1\u7684\u6642\u5019\u64da\u985e\u578b<\/p>\n<p><strong>nullif(expr1,expr2)\uff1a<\/strong>\u6bd4\u8f03expr1\u548cexpr2\uff0c\u5982\u679c\u4e8c\u8005\u76f8\u7b49\u5247\u8fd4\u56denull\uff0c\u5426\u5247\u8fd4\u56deexpr1<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0greatest(&#8216;terry&#8217;,&#8217;888&#8242;,&#8217;zhanna&#8217;,&#8217;666&#8242;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0least(&#8216;terry&#8217;,&#8217;888&#8242;,&#8217;zhanna&#8217;,&#8217;666&#8242;),<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0nullif(&#8216;terry&#8217;,&#8217;zhanna&#8217;),nullif(&#8216;1&#8242;,&#8217;1&#8217;)<\/li>\n<li>\u00a0\u00a0from\u00a0dual<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td>greatest(&#8216;terry&#8217;,&#8217;888&#8242;,&#8217;zhanna&#8217;,&#8217;666&#8242;)<\/td>\n<td>zhanna<\/td>\n<td>nullif(&#8216;terry&#8217;,&#8217;zhanna&#8217;)<\/td>\n<td>terry<\/td>\n<\/tr>\n<tr>\n<td>least(&#8216;terry&#8217;,&#8217;888&#8242;,&#8217;zhanna&#8217;,&#8217;666&#8242;)<\/td>\n<td>666<\/td>\n<td>nullif(&#8216;1&#8242;,&#8217;1&#8217;)<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>sys_connect_by_path(column,char)\uff1a<\/strong>\u7528\u65bc\u8fd4\u56de\u5f9e\u6839\u5230\u5b50\u7bc0\u9ede\u7684\u5217\u503c\u8def\u9032\uff0c\u503c\u9069\u7528\u4e8e\u5c64\u6b21\u67e5\u8a62<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u5c55\u6210\u54c1\u6599\u865fTE902C\u00a0BOM\u4e0b\u968e\u5143\u4ef6<\/li>\n<li>select\u00a0lpad(&#8216;\u00a0&#8216;,2*level-1)||sys_connect_by_path(bmb03,&#8217;|&#8211;&#8216;)\u00a0&#8220;TE902C\u5c55BOM\u5143\u4ef6&#8221;<\/li>\n<li>\u00a0\u00a0from\u00a0bmb_file<\/li>\n<li>\u00a0\u00a0start\u00a0with\u00a0bmb01\u00a0=\u00a0&#8216;TE902C&#8217;<\/li>\n<li>\u00a0\u00a0connect\u00a0by\u00a0prior\u00a0bmb03\u00a0=\u00a0bmb01<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>|&#8211;1300-00677002<br \/>\n|&#8211;1300-00677002|&#8211;3230-00677000<br \/>\n|&#8211;1300-00677002|&#8211;5410-TE902C02<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100117<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100117|&#8211;2101-01002000<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100117|&#8211;2101-02001034<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100118<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100118|&#8211;2102-02003001<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00100118|&#8211;2230-05005000<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200300<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200300|&#8211;2101-04012016<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200300|&#8211;2102-02003001<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200311<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200311|&#8211;2101-04012016<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200325<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200325|&#8211;2101-04012016<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200325|&#8211;2230-02002001<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200409<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200409|&#8211;2101-04012016<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;1800-00200409|&#8211;2230-02002001<br \/>\n|&#8211;1300-00677002|&#8211;LPLA10002|&#8211;2101-02001035<br \/>\n|&#8211;4410-TE902C00<br \/>\n|&#8211;6110-11001000<\/p>\n<p>&nbsp;<\/p>\n<p><strong>6\u3001\u5206\u6790\u805a\u5408\u51fd\u6570<\/strong><\/p>\n<p><strong>rank(expr1,expr2,&#8230;) within group(order by col1,col2,&#8230;)\uff1a<\/strong>\u8fd4\u56de\u7279\u5b9a\u6578\u503c\u5728\u7d71\u8a08\u6578\u503c\u4e2d\u6240\u4f54\u64da\u7684\u7b49\u7d1a,expr1,expr2,&#8230;\u5fc5\u9808\u70ba\u5e38\u6578<br \/>\n<strong>dense_rank(expr1,expr2,&#8230;) within group(order by expr1,expr2,&#8230;)\uff1a<\/strong>\u8fd4\u56de\u7279\u5b9a\u6578\u503c\u5728\u4e00\u7d44\u884c\u6578\u64da\u4e2d\u7684\u7b49\u7d1a<br \/>\n<strong>percent_rank(expr1,expr2,&#8230;) within group(order by expr1,expr2,&#8230;)\uff1a<\/strong>\u8fd4\u56de\u7279\u5b9a\u6578\u503c\u5728\u7d71\u8a08\u6578\u503c\u5728\u7d71\u8a08\u7d1a\u5225\u4e2d\u6240\u5360\u7684\u6bd4\u4f8b<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0rank(1530.100000)\u00a0within\u00a0group(order\u00a0by\u00a0apa31)\u00a0rank_level,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dense_rank(1530.100000)\u00a0within\u00a0group(order\u00a0by\u00a0apa31)\u00a0dense_rank_level,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0percent_rank(1530.100000)\u00a0within\u00a0group(order\u00a0by\u00a0apa31)\u00a0percent_quto<\/li>\n<li>\u00a0\u00a0from\u00a0ds.apa_file<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>RANK_LEVEL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0DENSE_RANK_LEVEL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0PERCENT_QUTO<br \/>\n2254\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a01159\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a00.312136326<\/p>\n<p>&nbsp;<\/p>\n<p><strong>percentile_cont(percent_expr)within group(order by expr)\uff1a<\/strong>\u8fd4\u56de\u5728\u8a08\u7d1a\u5225\u4e2d\u8655\u65bc\u67d0\u500b\u767e\u5206\u9ede\u7684\u7279\u5b9a\u6578\u503c(\u6309\u7167\u9023\u7e8c\u5206\u4f48\u6a21\u578b\u78ba\u5b9a)<br \/>\n<strong>percentile_disc(percent_expr)within group(order by expr)\uff1a<\/strong>\u8fd4\u56de\u5728\u8a08\u7d1a\u5225\u4e2d\u8655\u65bc\u67d0\u500b\u767e\u5206\u9ede\u7684\u7279\u5b9a\u6578\u503c(\u6309\u7167\u96e2\u6563\u5206\u4f48\u6a21\u578b\u78ba\u5b9a)<\/p>\n<p><strong>first<\/strong>\uff1a\u53d6\u5f97\u6392\u5e8f\u7b49\u7d1a\u7684\u7b2c\u4e00\u7d1a\uff0c\u7136\u5f8c\u4f7f\u7528\u5206\u7d44\u51fd\u6578\u532f\u7e3d\u8a72\u7b49\u7d1a\u7684\u6578\u64da,\u8a72\u51fd\u6578\u4e0d\u80fd\u5920\u55ae\u7368\u4f7f\u7528\uff0c\u5fc5\u9808\u8207\u5176\u5b83\u5206\u7d44\u51fd\u6578\u7d50\u5408\u4f7f\u7528<br \/>\n<strong>last<\/strong>\uff1a\u53d6\u5f97\u6392\u5e8f\u7b49\u7d1a\u7684\u6700\u5f8c\u4e00\u7d1a\uff0c\u7136\u5f8c\u4f7f\u7528\u5206\u7d44\u51fd\u6578\u532f\u7e3d\u8a72\u7b49\u7d1a\u7684\u6578\u64da,\u8a72\u51fd\u6578\u4e0d\u80fd\u5920\u55ae\u7368\u4f7f\u7528\uff0c\u5fc5\u9808\u8207\u5176\u5b83\u5206\u7d44\u51fd\u6578\u7d50\u5408\u4f7f\u7528<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0min(apa35)\u00a0keep\u00a0(dense_rank\u00a0first\u00a0order\u00a0by\u00a0apa31\u00a0desc)\u00a0&#8220;AP\u91d1\u984d\u6700\u591a\u7b49\u7d1a\u4e2d\u7684\u6700\u5c0f\u5df2\u4ed8&#8221;,<\/li>\n<li><\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0max(apa35)\u00a0keep\u00a0(dense_rank\u00a0first\u00a0order\u00a0by\u00a0apa31\u00a0desc)\u00a0&#8220;AP\u91d1\u984d\u6700\u591a\u7b49\u7d1a\u4e2d\u7684\u6700\u5927\u5df2\u4ed8&#8221;<\/li>\n<li><\/li>\n<li>\u00a0\u00a0from\u00a0ds.apa_file<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<p>AP\u91d1\u984d\u6700\u591a\u7b49\u7d1a\u4e2d\u7684\u6700\u5c0f\u5df2\u4ed8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AP\u91d1\u984d\u6700\u591a\u7b49\u7d1a\u4e2d\u7684\u6700\u5927\u5df2\u4ed8<br \/>\n3500000\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3500000<\/p>\n<p>&nbsp;<\/p>\n<p><strong>over()<\/strong>\u8996\u7a97\u51fd\u6578<br \/>\n<strong>over ([partition by col1] order by col2) )<\/strong> \u8868\u793a\u4f9dcol1\u5206\u7d44,\u4f9dcol2\u5728\u5206\u7d44\u985e\u6392\u5e8f<br \/>\nover\u51fd\u6578\u4e0d\u80fd\u5920\u55ae\u7368\u4f7f\u7528\uff0c\u5fc5\u9808\u548c\u5176\u5b83\u7684\u5206\u7d44\/\u5206\u6790\u51fd\u6578\u914d\u5408\u4f7f\u7528<br \/>\nover\u51fd\u6578\u4e0d\u53ef\u7528\u5728where\u5b50\u53e5\u4e2d<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u7d71\u8a082G88\u82072G60\u90e8\u95802012-04\u6708\u85aa\u8cc7\u5206\u914d<\/li>\n<li>select\u00a0cqk09\u00a0\u59d3\u540d,cqk05\u00a0\u90e8\u9580,cqk30\u00a0\u85aa\u6c34,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum(cqk30)\u00a0over(partition\u00a0by\u00a0cqk05\u00a0order\u00a0by\u00a0cqk09)\u00a0\u90e8\u9580\u85aa\u6c34\u9023\u7e8c\u52a0\u7e3d,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum(cqk30)\u00a0over(partition\u00a0by\u00a0cqk05)\u00a0\u90e8\u9580\u85aa\u6c34\u7e3d\u8a08,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0100*(round(cqk30\/sum(cqk30)\u00a0over(partition\u00a0by\u00a0cqk05),5))\u00a0&#8220;\u500b\u4eba\u85aa\u6c34\u5360\u90e8\u9580\u4efd\u984d%&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum(cqk30)\u00a0over(order\u00a0by\u00a0cqk05,cqk09)\u00a0\u6240\u6709\u85aa\u6c34\u9023\u7e8c\u52a0\u7e3d,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sum(cqk30)\u00a0over()\u00a0\u6240\u6709\u85aa\u6c34\u7e3d\u8a08,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0100*(round(cqk30\/sum(cqk30)\u00a0over(),5))\u00a0&#8220;\u500b\u4eba\u85aa\u6c34\u5360\u7e3d\u548c\u4efd\u984d%&#8221;<\/li>\n<li>\u00a0\u00a0from\u00a0cqk_file<\/li>\n<li>\u00a0\u00a0where\u00a0cqk03=2012\u00a0and\u00a0cqk031\u00a0=\u00a04\u00a0and\u00a0cqk05\u00a0in\u00a0(&#8216;2G88&#8242;,&#8217;2G60&#8217;)<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td>\u59d3\u540d<\/td>\n<td>\u90e8\u9580<\/td>\n<td>\u85aa\u6c34<\/td>\n<td>\u90e8\u9580\u85aa\u6c34\u9023\u7e8c\u52a0\u7e3d<\/td>\n<td>\u90e8\u9580\u85aa\u6c34\u7e3d\u8a08<\/td>\n<td>\u500b\u4eba\u85aa\u6c34\u5360\u90e8\u9580\u4efd\u984d%<\/td>\n<td>\u6240\u6709\u85aa\u6c34\u9023\u7e8c\u52a0\u7e3d<\/td>\n<td>\u6240\u6709\u85aa\u6c34\u7e3d\u8a08<\/td>\n<td>\u500b\u4eba\u85aa\u6c34\u5360\u7e3d\u548c\u4efd\u984d%<\/td>\n<\/tr>\n<tr>\n<td>AX<\/td>\n<td>2G60<\/td>\n<td>33086<\/td>\n<td>33086<\/td>\n<td>138382<\/td>\n<td>23.909<\/td>\n<td>33086<\/td>\n<td>335666<\/td>\n<td>9.857<\/td>\n<\/tr>\n<tr>\n<td>BX<\/td>\n<td>2G60<\/td>\n<td>77884<\/td>\n<td>110970<\/td>\n<td>138382<\/td>\n<td>56.282<\/td>\n<td>110970<\/td>\n<td>335666<\/td>\n<td>23.203<\/td>\n<\/tr>\n<tr>\n<td>CX<\/td>\n<td>2G60<\/td>\n<td>27412<\/td>\n<td>138382<\/td>\n<td>138382<\/td>\n<td>19.809<\/td>\n<td>138382<\/td>\n<td>335666<\/td>\n<td>8.166<\/td>\n<\/tr>\n<tr>\n<td>DX<\/td>\n<td>2G88<\/td>\n<td>56273<\/td>\n<td>56273<\/td>\n<td>197284<\/td>\n<td>28.524<\/td>\n<td>194655<\/td>\n<td>335666<\/td>\n<td>16.765<\/td>\n<\/tr>\n<tr>\n<td>SS<\/td>\n<td>2G88<\/td>\n<td>70994<\/td>\n<td>127267<\/td>\n<td>197284<\/td>\n<td>35.986<\/td>\n<td>265649<\/td>\n<td>335666<\/td>\n<td>21.15<\/td>\n<\/tr>\n<tr>\n<td>IP<\/td>\n<td>2G88<\/td>\n<td>39187<\/td>\n<td>166454<\/td>\n<td>197284<\/td>\n<td>19.863<\/td>\n<td>304836<\/td>\n<td>335666<\/td>\n<td>11.674<\/td>\n<\/tr>\n<tr>\n<td>DS<\/td>\n<td>2G88<\/td>\n<td>30830<\/td>\n<td>197284<\/td>\n<td>197284<\/td>\n<td>15.627<\/td>\n<td>335666<\/td>\n<td>335666<\/td>\n<td>9.185<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;row_number()\u7d50\u5408over\u6392\u5e8f\u7d71\u8a082012-04\u85aa\u8cc7\u6c34\u5e73\u4e2d\u5404\u90e8\u9580\u6700\u9ad8\u76842\u4f4d<\/li>\n<li>\u00a0\u00a0&#8212;\u00a0select\u00a0cqk09\u00a0\u59d3\u540d,cqk05\u00a0\u90e8\u9580,cqk30\u00a0\u85aa\u6c34,<\/li>\n<li>\u00a0\u00a0&#8212;\u00a0\u00a0row_number()\u00a0over(partition\u00a0by\u00a0cqk05\u00a0order\u00a0by\u00a0cqk30\u00a0desc)\u00a0as\u00a0salary_order<\/li>\n<li>\u00a0\u00a0&#8212;\u00a0\u00a0from\u00a0cqk_file<\/li>\n<li>\u00a0\u00a0&#8212;\u00a0\u00a0where\u00a0cqk03=2012\u00a0and\u00a0cqk031\u00a0=\u00a04\u00a0and\u00a0salary_order&lt;=2\u00a0&#8211;\u6b64\u8655\u7121\u6cd5\u5f15\u7528salary_order,\u76f4\u63a5\u7528over\u904b\u7b97\u5f0f\u4e5f\u662f\u932f\u8aa4\u7684<\/li>\n<li>\u00a0\u00a0&#8212;\u00a0\u4e0a\u8ff0SQL\u6bb5\u662f\u932f\u8aa4\u7684over\u67e5\u8a62\u51fa\u4f86\u4f9d\u5225\u540d\u505a\u5217\u4e5f\u4e0d\u53ef\u4ee5\u4e8ewhere\u5b50\u53e5\u4e2d\u4f7f\u7528<\/li>\n<li>\u00a0\u00a0select\u00a0cqk09\u00a0\u59d3\u540d,cqk05\u00a0\u90e8\u9580,cqk30\u00a0\u85aa\u6c34,salary_order\u00a0\u6392\u5e8f<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0from\u00a0(<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0select\u00a0cqk09,cqk05,cqk30,<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0row_number()\u00a0over(partition\u00a0by\u00a0cqk05\u00a0order\u00a0by\u00a0cqk30\u00a0desc)\u00a0salary_order<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0from\u00a0cqk_file<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0where\u00a0cqk03=2012\u00a0and\u00a0cqk031\u00a0=\u00a04\u00a0and\u00a0cqk05\u00a0in(&#8216;2G60&#8242;,&#8217;2G88&#8217;)<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)cqk_temp_file<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0where\u00a0salary_order\u00a0&lt;=\u00a02<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td>\u59d3\u540d<\/td>\n<td>\u90e8\u9580<\/td>\n<td>\u85aa\u6c34<\/td>\n<td>\u6392\u5e8f<\/td>\n<\/tr>\n<tr>\n<td>BX<\/td>\n<td>2G60<\/td>\n<td>77884<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>AX<\/td>\n<td>2G60<\/td>\n<td>33086<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>SS<\/td>\n<td>2G88<\/td>\n<td>70994<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>DX<\/td>\n<td>2G88<\/td>\n<td>56273<\/td>\n<td>2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>row_number() \u3001rownum\u3001rank()\u3001dense_rank()\u5340\u5225\u8aaa\u660e<\/strong><br \/>\nrow_number() over(partition\u00a0by col1 order by col2)\uff1a\u6b64\u51fd\u6570\u8ba1\u7b97\u7684\u503c\u5c31\u8868\u793a\u6bcf\u7ec4\u5185\u90e8\u6392\u5e8f\u540e\u7684\u987a\u5e8f\u7f16\u53f7(\u7ec4\u5185\u8fde\u7eed\u7684\u552f\u4e00\u7684)<\/p>\n<p>row_number()\u548crownum\u5dee\u4e0d\u591a\uff0c\u529f\u80fd\u66f4\u5f3a\u4e00\u70b9(\u53ef\u4ee5\u5728\u5404\u4e2a\u5206\u7ec4\u5185\u4ece1\u5f00\u65f6\u6392\u5e8f)<\/p>\n<p>rank()\uff1a\u662f\u8df3\u8dc3\u6392\u5e8f,\u6709\u4e24\u4e2a\u7b2c\u4e8c\u540d\u65f6\u63a5\u4e0b\u6765\u5c31\u662f\u7b2c\u56db\u540d(\u540c\u6837\u662f\u5728\u5404\u4e2a\u5206\u7ec4\u5185)<\/p>\n<p>dense_rank()\uff1a\u662f\u8fde\u7eed\u6392\u5e8f,\u6709\u4e24\u4e2a\u7b2c\u4e8c\u540d\u65f6\u4ecd\u7136\u8ddf\u7740\u7b2c\u4e09\u540d.\u76f8\u6bd4\u4e4b\u4e0brow_number\u662f\u6ca1\u6709\u91cd\u590d\u503c\u7684.<\/p>\n<p><strong>rank()\u8207dense_rank()\u53carow_number()\u4e0d\u540c\u9ede\u8aaa\u660e<\/strong><\/p>\n<p><strong>\u00a0\u00a0rank()\u4f9d\u85aa\u6c34\u6392\u5e8f\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dense_rank()\u4f9d\u85aa\u6c34\u6392\u5e8f\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 row_number()\u4f9d\u85aa\u6c34\u6392\u5e8f<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td>\u59d3\u540d<\/td>\n<td>\u90e8\u9580<\/td>\n<td>\u85aa\u6c34<\/td>\n<td>\u6392\u5e8f<\/td>\n<td>&nbsp;<\/td>\n<td>\u59d3\u540d<\/td>\n<td>\u90e8\u9580<\/td>\n<td>\u85aa\u6c34<\/td>\n<td>\u6392\u5e8f<\/td>\n<td>&nbsp;<\/td>\n<td>\u59d3\u540d<\/td>\n<td>\u90e8\u9580<\/td>\n<td>\u85aa\u6c34<\/td>\n<td>\u6392\u5e8f<\/td>\n<\/tr>\n<tr>\n<td>SI<\/td>\n<td>2BSB<\/td>\n<td>8888<\/td>\n<td><strong>1<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>SI<\/td>\n<td>2BSB<\/td>\n<td>8888<\/td>\n<td><strong>1<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>SI<\/td>\n<td>2BSB<\/td>\n<td>8888<\/td>\n<td><strong>1<\/strong><\/td>\n<\/tr>\n<tr>\n<td>DI<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>2<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>DI<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>2<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>DI<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>2<\/strong><\/td>\n<\/tr>\n<tr>\n<td>BP<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>2<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>BP<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>2<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>BP<\/td>\n<td>2BSB<\/td>\n<td>6666<\/td>\n<td><strong>3<\/strong><\/td>\n<\/tr>\n<tr>\n<td>SP<\/td>\n<td>2BSB<\/td>\n<td>3232<\/td>\n<td><strong>4<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>SP<\/td>\n<td>2BSB<\/td>\n<td>3232<\/td>\n<td><strong>3<\/strong><\/td>\n<td>&nbsp;<\/td>\n<td>SP<\/td>\n<td>2BSB<\/td>\n<td>3232<\/td>\n<td><strong>4<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>group_id()\uff1a<\/strong>\u5340\u5206\u5206\u7d44\u7d50\u679c\u4e2d\u7684\u91cd\u8907\u884c<br \/>\n<strong>grouping(expr)\uff1a<\/strong>\u7528\u65bc\u78ba\u5b9a\u5206\u7d44\u7d50\u679c\u662f\u5426\u7528\u5230\u4e86\u7279\u5b9a\u7684\u904b\u7b97\u5f0f<br \/>\n\u8fd4\u56de\u503c0\u8868\u793a\u7528\u5230\u4e86\u8a72\u904b\u7b97\u5f0f\uff0c\u8fd4\u56de\u503c1\u8868\u6b7b\u672a\u7528\u5230\u8a72\u904b\u7b97\u5f0f<br \/>\n<strong>grouping_id(expr1[,expr2],,,)\uff1a<\/strong>\u7528\u65bc\u8fd4\u56de\u5c0d\u61c9\u4e8e\u7279\u5b9a\u884c\u7684grouping\u4f4d\u5411\u91cf\u7684\u503c<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>select\u00a0apa00,apa13,sum(apa31f),grouping(apa13)<\/li>\n<li>\u00a0\u00a0from\u00a0apa_file<\/li>\n<li>\u00a0\u00a0group\u00a0by\u00a0rollup(apa00,apa13)<\/li>\n<li>\u00a0\u00a0order\u00a0by\u00a0apa00,apa13<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td>APA00<\/td>\n<td>APA13<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SUM(APA31F)<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0 GROUPING(APA13)<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>HKD<\/td>\n<td>23731714.84<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>NTD<\/td>\n<td>942131<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a00<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>RMB<\/td>\n<td>22999119.68<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>USD<\/td>\n<td>2180<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>&nbsp;<\/td>\n<td>47675145.52<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>HKD<\/td>\n<td>107141459.6<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>NTD<\/td>\n<td>119680<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>RMB<\/td>\n<td>69738785.2<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>USD<\/td>\n<td>92773.7<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>&nbsp;<\/td>\n<td>177092698.5<\/td>\n<td>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1<\/td>\n<\/tr>\n<tr>\n<td><strong>\u2026<\/strong><\/td>\n<td><strong>\u2026<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2026<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2026<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>&#8211;\u4e00\u689dSQL\u67e5\u8a62\u51fa\u6240\u6709\u7a0b\u5f0faction\u4e2d\u82f1\u6587\u8aaa\u660e\uff1a<\/li>\n<li>select\u00a0program\u00a0as\u00a0&#8220;\u7a0b\u5f0f\u4ee3\u78bc&#8221;,\u00a0gaz03\u00a0as\u00a0&#8220;\u7a0b\u5f0f\u540d\u7a31&#8221;\u00a0,actionResultList\u00a0as\u00a0&#8220;\u7a0b\u5f0f\u529f\u80fd\u6e05\u55ae&#8221;<\/li>\n<li>\u00a0from\u00a0(select\u00a0program,substr(max(sys_connect_by_path(action,&#8217;;&#8217;)),2)\u00a0as\u00a0actionResultList<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0from\u00a0(select\u00a0program,action,rank()\u00a0over\u00a0(partition\u00a0by\u00a0actionList.program\u00a0order\u00a0by\u00a0actionList.action\u00a0desc)actionOrder<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0from\u00a0(select\u00a0gap01\u00a0as\u00a0program,gap02||&#8217;:&#8217;||gbd04\u00a0as\u00a0action\u00a0from\u00a0gap_file<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0left\u00a0join\u00a0gbd_file\u00a0on\u00a0gap02\u00a0=\u00a0gbd01<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0where\u00a0gbd03\u00a0=\u00a0&#8216;0&#8217;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)actionList<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)actionOrderList<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0connect\u00a0by\u00a0actionOrder-1\u00a0=\u00a0prior\u00a0actionOrder\u00a0and\u00a0program\u00a0=\u00a0prior\u00a0program<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0start\u00a0with\u00a0actionOrder\u00a0=\u00a01<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0group\u00a0by\u00a0program<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0order\u00a0by\u00a0program<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)actionReusltTable<\/li>\n<li>\u00a0\u00a0\u00a0left\u00a0join\u00a0gaz_file\u00a0on\u00a0program\u00a0=\u00a0gaz01<\/li>\n<li>\u00a0\u00a0\u00a0where\u00a0gaz02\u00a0=\u00a0&#8216;0&#8217;<\/li>\n<li>\u00a0\u00a0\u00a0order\u00a0by\u00a0program<\/li>\n<\/ol>\n<p>&#8211;\u7ed3\u679c\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>\u00a0\u00a0\u00a0<\/strong><\/td>\n<td><strong>\u7a0b\u5f0f\u4ee3\u78bc<\/strong><\/td>\n<td><strong>\u7a0b\u5f0f\u540d\u7a31<\/strong><\/td>\n<td><strong>\u7a0b\u5f0f\u529f\u80fd\u6e05\u55ae<\/strong><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>aapi001<\/td>\n<td>\u96c6\u5718\u4ee3\u6536\u4ed8\u57fa\u672c\u8cc7\u6599\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>query:\u67e5\u8a62;output:\u5217\u5370;locale:\u8a9e\u8a00;help:\u5e6b\u52a9\u2026.<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>aapi010<\/td>\n<td>\u96f6\u7528\u91d1\u61c9\u4ed8\u5e33\u6b3e\u7cfb\u7d71\u55ae\u64da\u6027\u8cea\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>invalid:\u7121\u6548;insert:\u65b0\u589e;authorization:\u4f7f\u7528\u8005\u8a2d\u9650\u2026<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>aapi101<\/td>\n<td>\u61c9\u4ed8\u5e33\u6b3e\u5404\u671f\u7d71\u8a08\u958b\u5e33\u4f5c\u696d<\/td>\n<td>previous:\u4e0a\u7b46;next:\u4e0b\u7b46;modify:\u66f4\u6539&#8230;<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>aapi102<\/td>\n<td>\u61c9\u4ed8\u5e33\u6b3e(\u4f9d\u55ae\u865f)\u5404\u671f\u7d71\u8a08\u958b\u5e33\u4f5c\u696d<\/td>\n<td>related_document:\u76f8\u95dc\u6587\u4ef6;query:\u67e5\u8a62\u2026<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>aapi103<\/td>\n<td>\u61c9\u4ed8\u5e33\u6b3e\u7cfb\u7d71\u55ae\u64da\u6027\u8cea\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>dept_authorization:\u90e8\u9580\u8a2d\u9650;delete:\u522a\u9664\u2026<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>aapi104<\/td>\n<td>\u5e33\u6b3e\u985e\u5225\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>query:\u67e5\u8a62;qbe_select:\u689d\u4ef6\u67e5\u8a62;qbe_save:\u689d\u4ef6\u5132\u5b58\u2026<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>aapi105<\/td>\n<td>\u7559\u7f6e\u539f\u56e0\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>query:\u67e5\u8a62\u2026<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>aapi108<\/td>\n<td>\u7d71\u4e00\u7de8\u865f\u8cc7\u6599\u7dad\u8b77\u4f5c\u696d<\/td>\n<td>exit:\u7d50\u675f;delete:\u522a\u9664;controlz:\u5fc5\u8981\u6b04\u4f4d;controlg:\u958b\u7a97\u67e5\u8a62\u2026<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>aapi111<\/td>\n<td>\u96f6\u7528\u91d1\u61c9\u4ed8\u5e33\u6b3e\u5404\u671f\u7d71\u8a08\u958b\u5e33\u4f5c\u696d<\/td>\n<td>previous:\u4e0a\u7b46;next:\u4e0b\u7b46;modify:\u66f4\u6539insert:\u65b0\u589e;delete:\u522a\u9664\u2026<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u7d71\u8a08&#8217;Tri-Net&#8217;,&#8217;AMBER -W&#8217;,&#8217;Belkin-C&#8217;,&#8217;GTC&#8217;,&#8217;SAN SHIN&#8217;\u5ba2\u6236\u5404\u6708\u4efd\u63a5\u55ae\u91d1\u984d<\/strong><\/p>\n<p><strong>\u8981\u6c42\u8f38\u51fa\u683c\u5f0f\u70ba<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td>\u63a5\u55ae\u6708\u4efd<\/td>\n<td>Tri-Net<\/td>\n<td>AMBER -W<\/td>\n<td>Belkin-C<\/td>\n<td>GTC<\/td>\n<td>SAN SHIN<\/td>\n<\/tr>\n<tr>\n<td>2011\/08<\/td>\n<td>\u63a5\u55ae\u91d1\u984d<\/td>\n<td>\u63a5\u55ae\u91d1\u984d<\/td>\n<td>\u63a5\u55ae\u91d1\u984d<\/td>\n<td>\u63a5\u55ae\u91d1\u984d<\/td>\n<td>\u63a5\u55ae\u91d1\u984d<\/td>\n<\/tr>\n<tr>\n<td>\u2026.<\/td>\n<td>\u2026.<\/td>\n<td>\u2026.<\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;view plain\">view plain<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;copy to clipboard\">copy to clipboard<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;print\">print<\/a><a href=\"mk:@MSITStore:C:\\\\Users\\\\Administrator\\\\Videos\\\\TIPTOP ERP\u4e0d\u5b8c\u5168\u5b9e\u65bd\u5f00\u53d1\u624b\u518c.chm::\/3SQLFunction.&quot; \\o &quot;?\">?<\/a><\/p>\n<ol>\n<li>with\u00a0cte_oea_file\u00a0as<\/li>\n<li>(select\u00a0substr(to_char(oea02,&#8217;YYYY\/MM\/DD&#8217;),1,7)\u00a0po_date,oea032\u00a0po_custom,sum(oeb14)\u00a0po_sales<\/li>\n<li>\u00a0\u00a0\u00a0from\u00a0oea_file\u00a0join\u00a0oeb_file\u00a0on\u00a0oea01\u00a0=\u00a0oeb01<\/li>\n<li>\u00a0\u00a0\u00a0where\u00a0oea032\u00a0in\u00a0(&#8216;Tri-Net&#8217;,&#8217;AMBER\u00a0-W&#8217;,&#8217;Belkin-C&#8217;,&#8217;GTC&#8217;,&#8217;SAN\u00a0SHIN&#8217;)<\/li>\n<li>\u00a0\u00a0\u00a0group\u00a0by\u00a0substr(to_char(oea02,&#8217;YYYY\/MM\/DD&#8217;),1,7),oea032<\/li>\n<li>\u00a0\u00a0order\u00a0by\u00a01,2<\/li>\n<li>)<\/li>\n<li>select\u00a0po_date\u00a0&#8220;\u63a5\u55ae\u6708\u4efd&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0sum(decode(po_custom,&#8217;Tri-Net&#8217;,po_sales,0))\u00a0\u00a0&#8220;Tri-Net&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0sum(decode(po_custom,&#8217;AMBER\u00a0-W&#8217;,po_sales,0))\u00a0&#8220;AMBER\u00a0-W&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0sum(decode(po_custom,&#8217;Belkin-C&#8217;,po_sales,0))\u00a0&#8220;Belkin-C&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0sum(decode(po_custom,&#8217;GTC&#8217;,po_sales,0))\u00a0&#8220;GTC&#8221;,<\/li>\n<li>\u00a0\u00a0\u00a0sum(decode(po_custom,&#8217;SAN\u00a0SHIN&#8217;,po_sales,0))\u00a0&#8220;SAN\u00a0SHIN&#8221;<\/li>\n<li>\u00a0from\u00a0cte_oea_file<\/li>\n<li>\u00a0group\u00a0by\u00a0po_date<\/li>\n<li>\u00a0order\u00a0by\u00a0po_date<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td><strong>\u63a5\u55ae\u6708\u4efd<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Tri-Net<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0AMBER -W<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Belkin-C<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 GTC<\/strong><\/td>\n<td><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SAN SHIN<\/strong><\/td>\n<\/tr>\n<tr>\n<td>2011\/08<\/td>\n<td>768796.48<\/td>\n<td>161573.68<\/td>\n<td>14162.5<\/td>\n<td>319450<\/td>\n<td>10250.96<\/td>\n<\/tr>\n<tr>\n<td>2011\/09<\/td>\n<td>566008.26<\/td>\n<td>221550.9<\/td>\n<td>258366.5<\/td>\n<td>268070<\/td>\n<td>8920<\/td>\n<\/tr>\n<tr>\n<td>2011\/10<\/td>\n<td>270341.68<\/td>\n<td>76241.95<\/td>\n<td>147402<\/td>\n<td>85850<\/td>\n<td>9020<\/td>\n<\/tr>\n<tr>\n<td>2011\/11<\/td>\n<td>464575.39<\/td>\n<td>0<\/td>\n<td>284704<\/td>\n<td>469675<\/td>\n<td>15040<\/td>\n<\/tr>\n<tr>\n<td>2011\/12<\/td>\n<td>295007.55<\/td>\n<td>0<\/td>\n<td>140446.2<\/td>\n<td>918000<\/td>\n<td>21250<\/td>\n<\/tr>\n<tr>\n<td>2012\/01<\/td>\n<td>70835.5<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>274850<\/td>\n<td>5100<\/td>\n<\/tr>\n<tr>\n<td>2012\/02<\/td>\n<td>148424.53<\/td>\n<td>0<\/td>\n<td>1425<\/td>\n<td>235255<\/td>\n<td>40690<\/td>\n<\/tr>\n<tr>\n<td>2012\/03<\/td>\n<td>179333.31<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>638550<\/td>\n<td>55596.4<\/td>\n<\/tr>\n<tr>\n<td>2012\/04<\/td>\n<td>158162.51<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>212000<\/td>\n<td>10110<\/td>\n<\/tr>\n<tr>\n<td>2012\/05<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>220600<\/td>\n<td>30160<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=1028\">Oracle SQL\u5185\u7f6e\u51fd\u6570\u6d4b\u8bd5<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Oracle SQL\u5185\u7f6e\u51fd\u6570 Oracle\u5185\u7f6eSQL\u51fd\u6570\u4e3b\u8981\u5206\u4e3a\u4e00\u4e0b\u7c7b\u522b\uff1a\u6570\u5b57\u51fd\u6570\u3001\u5b57\u7b26\u51fd\u6570\u3001\u65e5\u671f\u51fd\u6570\u3001\u8f6c\u6362\u51fd\u6570\u3001\u96c6\u5408\u51fd\u6570\u3001\u5206\u6790\/\u805a\u5408\u51fd\u6570 \u672c\u624b\u518c\u6240\u6709\u793a\u4f8b\u5747\u4ee5TIPTOP GP 5.10 ERP\u6570\u636e\u5e93\u8868\u4e3a\u57fa\u7840\u6f14\u793a &nbsp; 1\u3001\u6570\u5b57\u51fd\u6570 abs( [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[305,306,307],"class_list":["post-1028","post","type-post","status-publish","format-standard","hentry","category-unix","tag-305","tag-306","tag-307"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1028"}],"version-history":[{"count":1,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1028\/revisions"}],"predecessor-version":[{"id":1029,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1028\/revisions\/1029"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}