{"id":7425,"date":"2019-10-17T06:00:16","date_gmt":"2019-10-16T21:00:16","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=7425"},"modified":"2019-08-07T11:55:35","modified_gmt":"2019-08-07T02:55:35","slug":"sqlplus-%e3%81%a7-oracle-db-%e3%81%8b%e3%82%89%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e6%8a%bd%e5%87%ba%e3%81%99%e3%82%8b%e9%9a%9b%e3%81%ae%e3%81%8a%e4%bd%9c%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=7425","title":{"rendered":"SQL*Plus \u3067 ORACLE DB \u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u969b\u306e\u304a\u4f5c\u6cd5"},"content":{"rendered":"\n<p>\u3000\u57fa\u5e79\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c Oracle DB \u306e\u5834\u5408\uff0c\u6700\u3082\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u62bd\u51fa\u65b9\u6cd5\u306e\u4e00\u3064\u306b SQL*Plus \u304c\u3042\u308b\uff0eSI Object Browser \u306a\u3069\u3082\u3042\u308b\u304c\u57fa\u672c\u6709\u511f\u3067\uff0c\u500b\u4eba\u3067\u8cfc\u5165\u3059\u308b\u306b\u306f\u5c11\u3057\u6577\u5c45\u304c\u9ad8\u3044\uff0e<\/p>\n<p>\u3000SQL*Plus \u3067\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\u306f\u52c9\u5f37\u4e2d\u306e\u305f\u3081\u672a\u77e5\u6570\u3060\u304c\uff0c\u3042\u3089\u304b\u3058\u3081 .sql \u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u304a\u3044\u3066\u5b9f\u884c\u3059\u308b\u306a\u3089\u5fc3\u7406\u7684\u306a\u969c\u58c1\u3082\u4e0b\u304c\u308b\uff0e<\/p>\n<p><!--more--><\/p>\n<h3>Windows \u30e1\u30cb\u30e5\u30fc\u304b\u3089\u691c\u7d22\u3057\u3066\u8d77\u52d5<\/h3>\n<p>\u3000Oracle DB \u304c\u7a3c\u50cd\u4e2d\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306a\u3089\u3059\u3067\u306b SQL*Plus \u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u306e\u306f\u305a\u3067\u3042\u308b\uff0eWindows \u30e1\u30cb\u30e5\u30fc\u304b\u3089\u691c\u7d22\u3057\u3066\u8d77\u52d5\u3059\u308b\uff0e<\/p>\n<h3>\u30ed\u30b0\u30a4\u30f3<\/h3>\n<p>\u3000ID \u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u304c SQL&gt; \u3068\u5909\u5316\u3059\u308b\uff0e<\/p>\n<h3>@ \u3092\u3064\u3051\u3066\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c<\/h3>\n<p>\u3000\u3053\u3053\u306b\u30af\u30a8\u30ea\u3092\u30bf\u30a4\u30d7\u3057\u3066\u3044\u3063\u3066\u3082\u826f\u3044\u306e\u3067\u3042\u308b\u304c\uff0c\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5148\u982d\u306b @ \u3092\u3064\u3051\u3066\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u3092\u6307\u5b9a\u3059\u308b\u3068\uff0c\u30d5\u30a1\u30a4\u30eb\u5185\u306b\u8a18\u8ff0\u3057\u305f\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3067\u304d\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample01\">@C:\\Sample.SQL;<\/pre>\n<p>\u3000\u4e0a\u8a18\u306f C \u30c9\u30e9\u30a4\u30d6\u76f4\u4e0b\u306e Sample.SQL \u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\uff0e\u62e1\u5f35\u5b50\u306f .txt \u3067\u3082\u69cb\u308f\u306a\u3044\uff0e<\/p>\n<h3>SQL \u30d5\u30a1\u30a4\u30eb\u8a18\u8ff0\u306e\u304a\u4f5c\u6cd5<\/h3>\n<h4>\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58<\/h4>\n<p>\u3000\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3059\u308b\u5834\u5408\uff0c\u4e3b\u306a\u76ee\u7684\u306f\u30c7\u30fc\u30bf\u62bd\u51fa\u306e\u306f\u305a\u3060\uff0e\u3060\u304b\u3089 .txt \u30d5\u30a1\u30a4\u30eb\u304b .csv \u30d5\u30a1\u30a4\u30eb\u306b\u62bd\u51fa\u7d50\u679c\u3092\u4fdd\u5b58\u3057\u305f\u3044\u306f\u305a\u3067\u3042\u308b\uff0e\u305d\u306e\u5834\u5408\uff0c\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u3068\u672b\u5c3e\u306b\u3053\u3046\u66f8\u304f\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample02\">spool c:\\File.txt;\n\nspool off;<\/pre>\n<h4>\u30ec\u30b3\u30fc\u30c9\u304c\u9014\u4e2d\u3067\u6539\u884c\u3055\u308c\u308b<\/h4>\n<p>\u3000\uff11\u884c\u3042\u305f\u308a\u306e\u6587\u5b57\u6570\u3092\u6700\u5927\u5024 32767 \u306b\u8a2d\u5b9a\u3059\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample03\">SET LINESIZE 32767;<\/pre>\n<p>\u3000\u4ed6\u306b\uff0c\u5b9f\u969b\u306b\u30c7\u30fc\u30bf\u4e2d\u306b\u6539\u884c\u30b3\u30fc\u30c9\u304c\u6df7\u5165\u3057\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308b\uff0e\u305d\u306e\u5834\u5408\u306f SELECT \u53e5\u3067 NULL \u306b\u7f6e\u63db\u3059\u308b\uff0e<\/p>\n<p>\u3000CHR(10) \u304a\u3088\u3073 CHR(13) \u306f ASCII \u914d\u5217\u3067\u3044\u3046\u3068\u3053\u308d\u306e\u30e9\u30a4\u30f3\u30d5\u30a3\u30fc\u30c9\u304a\u3088\u3073\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\u3067\u3042\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample04\">SELECT\nREPLACE(REPLACE(Column1,CHR(13),Null),CHR(10),Null) AS Column1\nFROM    Table<\/pre>\n<h4>\uff15\u30ec\u30b3\u30fc\u30c9\u3054\u3068\u306b\u6539\u30da\u30fc\u30b8\u304c\u5165\u308b<\/h4>\n<p>\u3000\uff11\u30da\u30fc\u30b8\u3042\u305f\u308a\u306e\u30ec\u30b3\u30fc\u30c9\u6570\u3092\u6700\u5927\u5024\u306b\u8a2d\u5b9a\u3059\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample05\">SET PAGESIZE 50000;<\/pre>\n<h4>\u672b\u5c3e\u306b\u4f59\u8a08\u306a\u30b9\u30da\u30fc\u30b9\u304c\u3064\u3044\u3066\u304f\u308b<\/h4>\n<p>\u3000\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample06\">SET TRIMSPOOL ON;<\/pre>\n<h4>\u5217\u306e\u533a\u5207\u308a\u3092\u30b3\u30f3\u30de\u306b\u3057\u305f\u3044<\/h4>\n<p>\u3000\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u534a\u89d2\u30b9\u30da\u30fc\u30b9\u3067\u3042\u308b\u3053\u3068\u304c\u591a\u3044\uff0e\u56fa\u5b9a\u30c7\u30fc\u30bf\u9577\u306a\u3089\u307e\u3060\u691c\u7d22\u7f6e\u63db\u3067\u5bfe\u5fdc\u3067\u304d\u308b\u304c\uff0c\u3067\u304d\u308c\u3070\u62bd\u51fa\u306e\u6bb5\u968e\u3067\u304d\u308c\u3044\u306b\u3057\u3066\u304a\u304d\u305f\u3044\uff0e\u305d\u306e\u5834\u5408\u51fa\u529b\u5148\u3092 .csv \u30d5\u30a1\u30a4\u30eb\u306b\u3057\u3066\u3082\u826f\u3044\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample07\">SET COLSEP ',';<\/pre>\n<h4>\u4e0a\u8a18\u3092\u307e\u3068\u3081\u308b\u3068&#8230;<\/h4>\n<p>\u3000\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308b\uff0e6 \u884c\u76ee\u306b\u5b9f\u969b\u306e\u30af\u30a8\u30ea\u3092\u8a18\u8ff0\u3059\u308b\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample08\">SET LINESIZE 32767;\nSET PAGESIZE 50000;\nSET TRIMSPOOL ON;\nSET COLSEP ','\nspool c:\\FILE.csv;\n\nspool off;<\/pre>\n<h4>\u5217\u306e\u9014\u4e2d\u306b\u30b9\u30da\u30fc\u30b9\u304c\u5165\u308b&#8230;<\/h4>\n<p>\u3000\u3072\u3068\u624b\u9593\u5897\u3048\u308b\u304c\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306e\u691c\u7d22\u7f6e\u63db\u3067\u9664\u53bb\u3059\u308b\u306e\u304c\u65e9\u3044\uff0e\u4ef6\u6570\u304c\u6570\u4e07\u4ef6\u3092\u8d85\u3048\u3066\u304f\u308b\u3068 MS Office \u7cfb\u306e\u91cd\u91cf\u7d1a\u30bd\u30d5\u30c8\u306f\u30e1\u30e2\u30ea\u304c\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3059\u308b\uff0e<\/p>\n<figure id=\"attachment_7468\" aria-describedby=\"caption-attachment-7468\" style=\"width: 424px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2019\/08\/03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7468\" src=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2019\/08\/03.png\" alt=\"MS Word\u3067\u5de8\u5927\u3059\u304e\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3053\u3046\u3068\u3057\u3066\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\" width=\"424\" height=\"180\" srcset=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2019\/08\/03.png 424w, https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2019\/08\/03-300x127.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><figcaption id=\"caption-attachment-7468\" class=\"wp-caption-text\">MS Word\u3067\u5de8\u5927\u3059\u304e\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3053\u3046\u3068\u3057\u3066\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc<\/figcaption><\/figure>\n<p>\u3000\u62bd\u51fa\u306e\u6642\u70b9\u3067\u4f55\u3068\u304b\u3057\u305f\u3044\u306a\u3089\uff0cSELECT \u53e5\u3067\u30d1\u30a4\u30d7\u3092\u4f7f\u7528\u3059\u308b\uff0e\u5217\u540d\u304c\u5909\u306a\u3053\u3068\u306b\u306a\u308b\u304c\uff0c\u5f8c\u3067\u52a0\u5de5\u3059\u308b\u4ed6\u306a\u3044\u3060\u308d\u3046\uff0e<\/p>\n<pre class=\"lang:tsql decode:true\" title=\"Sample09\">SELECT  Column1||','||Column2\nFROM    Table;<\/pre>\n<h3>Oracle SQL Developer \u3068\u3044\u3046\u624b\u3082<\/h3>\n<p>\u3000SQL*Plus \u306b\u306f\u5236\u7d04\u304c\u591a\u3044\uff0e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304c\u82e6\u624b\u3067\u3042\u308b\u4eba\u3082\u3044\u308b\u3060\u308d\u3046\uff0e\u30b0\u30e9\u30d5\u30a3\u30ab\u30eb\u30e6\u30fc\u30b6\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u306a\u3044\u3068\u4e0d\u90fd\u5408\uff0c\u3068\u3044\u3046\u5411\u304d\u306b\u306f <a href=\"https:\/\/blogs.oracle.com\/oracle4engineer\/csvoracle-sql-developer\" target=\"_blank\" rel=\"noopener noreferrer\">Oracle SQL Developer<\/a> \u3068\u3044\u3046\u624b\u6bb5\u3082\u3042\u308b\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u57fa\u5e79\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c Oracle DB \u306e\u5834\u5408\uff0c\u6700\u3082\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u62bd\u51fa\u65b9\u6cd5\u306e\u4e00\u3064\u306b SQL*Plus \u304c\u3042\u308b\uff0eSI Object Browser \u306a\u3069\u3082\u3042\u308b\u304c\u57fa\u672c\u6709\u511f\u3067\uff0c\u500b\u4eba\u3067\u8cfc\u5165\u3059\u308b\u306b\u306f\u5c11\u3057\u6577\u5c45\u304c\u9ad8\u3044\uff0e \u3000SQL*P &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=7425\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;SQL*Plus \u3067 ORACLE DB \u304b\u3089\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u969b\u306e\u304a\u4f5c\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":7493,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[4823,2879,4841,4838,4837,4831,2656,2775,4827,467,4097,4821,4835,4829,4836,4822,4826,4820,4830,1807,4840,2667,3578,4843,2783,4844,1805,4832,646,32,4839,4217,4825,4824,4834,4842,449,1794,4828,366,2943,3527,4833],"class_list":["post-7425","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-sql","tag-txt","tag-ascii","tag-chr10","tag-chr13","tag-colsep","tag-csv","tag-id","tag-linesize","tag-null","tag-oracle","tag-oracle-db","tag-oracle-sql-develope","tag-pagesize","tag-replace","tag-si-object-browser","tag-spool","tag-sqlplus","tag-trimspool","tag-windows","tag-4840","tag-2667","tag-3578","tag-4843","tag-2783","tag-4844","tag-1805","tag-4832","tag-646","tag-32","tag-4839","tag-4217","tag-4825","tag-4824","tag-4834","tag-4842","tag-449","tag-1794","tag-4828","tag-366","tag-2943","tag-3527","tag-4833"],"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/7425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7425"}],"version-history":[{"count":64,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/7425\/revisions"}],"predecessor-version":[{"id":7498,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/7425\/revisions\/7498"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/media\/7493"}],"wp:attachment":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7425"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}