{"id":3224,"date":"2018-02-03T23:12:54","date_gmt":"2018-02-03T14:12:54","guid":{"rendered":"http:\/\/haisins.epac.to\/wordpress\/?p=3224"},"modified":"2018-02-03T23:29:43","modified_gmt":"2018-02-03T14:29:43","slug":"%ed%95%9c%ea%b8%80-rtrim-%ed%95%a8%ec%88%98","status":"publish","type":"post","link":"http:\/\/haisins.synology.me\/wordpress\/?p=3224","title":{"rendered":"\ud55c\uae00 RTRIM \ud568\uc218"},"content":{"rendered":"<p>\uc624\ub77c\ud074\u00a0DB\uc5d0\u00a0\uc608\ub97c\ub4e4\uc5b4\u00a0&#8216;\uac00\ub098\u3137&#8217;\uacfc\u00a0\uac19\uc774\u00a0\ud55c\uae00\uc785\ub825\ub3c4\uc911\u00a0\uc798\ub9b0\uc790\ub8cc\uac00<\/p>\n<p>&nbsp;<\/p>\n<p>\ub4e4\uc5b4\uac14\uc744\u00a0\uacbd\uc6b0\u00a0&#8216;\uac00\ub098&#8217;\uc640\u00a0\uac19\uc774\u00a0\uc798\ub77c\uc8fc\ub294\u00a0\ud568\uc218<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:plsql decode:true \">create or replace function sf_hantrim( v_str in varchar2)\r\nreturn varchar2\r\nis\r\nl_str      varchar2(2000);\r\nl_last     varchar2(2);\r\nl_ascii    number;\r\nl_down     number;\r\n\/*==================================================================*\r\n *   +---------------------------------------------------------+    *\r\n *   | \ud504\ub85c\uadf8\ub7a8  ID :  sf_hantrim.sql                          |    *\r\n *   +---------------------------------------------------------+    *\r\n *   | \ud504\ub85c\uadf8\ub7a8  \uba85 :  \ud55c\uae00 field right trim                   |    *\r\n *   +---------------------------------------------------------+    *\r\n *   | \ud504\ub85c\uadf8\ub7a8  \uc124\uba85                                          |    *\r\n *   +---------------------------------------------------------+    *\r\n *   | \ud55c\uae00 \uc790\ub8cc\uc911 KSC5601\uc5d0 \uc5c6\ub294 \ud55c\uae00\uc790\ub8cc\ub97c rihgt trim\ud55c\ub2e4    |    *\r\n *   | \ucc38\uace0\uc790\ub8cc : KSC5601 code table                           |    *\r\n *   +---------------------------------------------------------+    *\r\n *==================================================================*\/\r\nbegin\r\n    l_str := nvl(rtrim(v_str),' ');\r\n    if length(l_str) = 0 then\r\n       l_str := ' ';\r\n    end if;\r\n    l_last := substr(l_str,length(l_str),1);\r\n    l_ascii := ascii(l_last);\r\n    if l_ascii &gt;= 45217 and l_ascii &lt;= 51454 then\r\n       l_down := mod(l_ascii,256);\r\n       if l_down &gt;= 161 and l_down &lt;= 254 then\r\n          return l_str;\r\n       else\r\n          return nvl(substr(l_str,1,length(l_str) - 1),' ');\r\n       end if;\r\n    else\r\n       return l_str;\r\n    end if;\r\nend sf_hantrim ;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc624\ub77c\ud074\u00a0DB\uc5d0\u00a0\uc608\ub97c\ub4e4\uc5b4\u00a0&#8216;\uac00\ub098\u3137&#8217;\uacfc\u00a0\uac19\uc774\u00a0\ud55c\uae00\uc785\ub825\ub3c4\uc911\u00a0\uc798\ub9b0\uc790\ub8cc\uac00 &nbsp; \ub4e4\uc5b4\uac14\uc744\u00a0\uacbd\uc6b0\u00a0&#8216;\uac00\ub098&#8217;\uc640\u00a0\uac19\uc774\u00a0\uc798\ub77c\uc8fc\ub294\u00a0\ud568\uc218 &nbsp; create or replace function sf_hantrim( v_str in varchar2) return varchar2 is l_str varchar2(2000); l_last varchar2(2); l_ascii number; l_down number; \/*==================================================================* * +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ * * | \ud504\ub85c\uadf8\ub7a8 ID : sf_hantrim.sql | * * +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ * * | \ud504\ub85c\uadf8\ub7a8 \uba85 : \ud55c\uae00 field right trim | * * +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ * * | \ud504\ub85c\uadf8\ub7a8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2875,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"spay_email":""},"categories":[3],"tags":[962,963,964],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/haisins.synology.me\/wordpress\/wp-content\/uploads\/2018\/02\/1-know-how.jpg?fit=937%2C450","amp_enabled":true,"_links":{"self":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3224"}],"collection":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3224"}],"version-history":[{"count":1,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3224\/revisions"}],"predecessor-version":[{"id":3225,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3224\/revisions\/3225"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/2875"}],"wp:attachment":[{"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3224"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/haisins.synology.me\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}