{"id":3471,"date":"2022-04-22T23:06:34","date_gmt":"2022-04-23T07:06:34","guid":{"rendered":"https:\/\/www.gudusoft.com\/?p=3471"},"modified":"2022-04-22T23:13:36","modified_gmt":"2022-04-23T07:13:36","slug":"sql-formatter-web-service","status":"publish","type":"post","link":"https:\/\/www.gudusoft.com\/jp\/sql-formatter-web-service\/","title":{"rendered":"SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf Web \u30b5\u30fc\u30d3\u30b9"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"background-color: rgba(255,255,255,0);background-position: center center;background-repeat: no-repeat;border-width: 0px 0px 0px 0px;border-color:#e8eaf0;border-style:solid;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start\" style=\"max-width:1310.4px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\"><div class=\"fusion-column-wrapper fusion-flex-justify-content-flex-start fusion-content-layout-column\" style=\"background-position:left top;background-repeat:no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;padding: 0px 0px 0px 0px;\"><div class=\"fusion-text fusion-text-1\" style=\"line-height:26px;\"><h3 class=\"wp-block-heading\">\u66f4\u65b0\u60c5\u5831 (2022)<\/h3>\n<p>\u3053\u308c\u306f2006\u5e74\u306b\u66f8\u304b\u308c\u305f\u8a18\u4e8b\u3067\u3001 <a href=\"https:\/\/www.codeguru.com\/csharp\/sql-formatter-web-service\/\" class=\"rank-math-link\">\u30b3\u30fc\u30c9\u30b0\u30eb<\/a> \u3001\u3053\u306e\u8a18\u4e8b\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u30c6\u30af\u30ce\u30ed\u30b8\u306f\u53e4\u304f\u306a\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 Java \u307e\u305f\u306f Dotnet \u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u7528\u3067\u304d\u308b\u512a\u308c\u305f SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u3092\u63a2\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001 <a href=\"https:\/\/sqlparser.com\/features\/sql-formatter.php\" class=\"rank-math-link\">\u3053\u306e\u30da\u30fc\u30b8\u3092\u30c1\u30a7\u30c3\u30af<\/a> \u4ee3\u308f\u308a\u306f\u3002\u7121\u6599\u3067\u7d20\u6674\u3089\u3057\u3044 SQL \u30af\u30a8\u30ea \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u3092\u304a\u63a2\u3057\u306e\u5834\u5408\u306f\u3001 <a href=\"https:\/\/www.dpriver.com\/pp\/sqlformat.htm\" class=\"rank-math-link\">\u30a4\u30f3\u30b9\u30bf\u30f3\u30c8 SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u3002<\/a><\/p>\n<h3 class=\"wp-block-heading\">\u5e8f\u7ae0<\/h3>\n<p>SQL \u30b3\u30fc\u30c9\u306f\u3001\u7279\u306b\u51e6\u7406\u3057\u3066\u3044\u308b\u9577\u304f\u3066\u8907\u96d1\u306a SQL \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u3042\u308b\u5834\u5408\u3084\u3001\u4ed6\u306e\u4eba\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3055\u308c\u3066\u3044\u308b\u3068\u3001\u306f\u308b\u304b\u306b\u7c21\u5358\u304b\u3064\u8fc5\u901f\u306b\u8aad\u307f\u53d6\u3063\u3066\u7406\u89e3\u3067\u304d\u307e\u3059\u3002\u307e\u3068\u3082\u306a SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u3092\u66f8\u304f\u306e\u306f\u7c21\u5358\u306a\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001C# \u3067\u30aa\u30f3\u30e9\u30a4\u30f3 SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u30fc\u3092\u4f5c\u6210\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u306e\u6d88\u8cbb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u66f8\u5f0f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044 SQL \u3092\u30b5\u30fc\u30d0\u30fc\u306b\u9001\u4fe1\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u306f\u66f8\u5f0f\u8a2d\u5b9a\u3055\u308c\u305f SQL \u3092\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u306e\u4f7f\u7528<\/h3>\n<p>\u306e Web \u30b5\u30fc\u30d3\u30b9&nbsp;<a href=\"https:\/\/www.gudusoft.com\/jp\/\">www.gudusoft.com<\/a>&nbsp;SQL \u30b3\u30fc\u30c9\u3092\u53d7\u3051\u5165\u308c\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3055\u308c\u305f SQL \u3092\u8fd4\u3057\u307e\u3059\u3002\u3053\u3053\u3067 WSDL \u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002\u91cd\u8981\u306a\u90e8\u5206\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002 beautifySql \u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"wp-block-code\"><code>  SQL \u3092\u7f8e\u3057\u304f\u3059\u308b <\/code><\/pre>\n<h4 class=\"wp-block-heading\">\u30b9\u30c6\u30c3\u30d7 1: \u30d7\u30ed\u30ad\u30b7 \u30af\u30e9\u30b9\u3092\u69cb\u7bc9\u3059\u308b<\/h4>\n<p>\u4ee5\u4e0b\u3092\u5b9f\u884c\u2026<\/p>\n<pre class=\"wp-block-code\"><code>C:&gt;wsdl.exe http:\/\/www.gudusoft.com\/SQLFormatterWebService.wsdl<\/code><\/pre>\n<p>\u2026 SQLFormatterWebService \u3068\u3044\u3046\u30af\u30e9\u30b9\u3092\u542b\u3080 C# \u30d5\u30a1\u30a4\u30eb SQLFormatterWebService.cs \u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u304c WSDL \u30d5\u30a1\u30a4\u30eb\u3067\u8a73\u8ff0\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3068\u3069\u306e\u3088\u3046\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u304b\u3001\u7279\u306b\u6b21\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u8abf\u3079\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"wp-block-code\"><code>public string beautifySql(string dbvendor, string sql) dbvendor: \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u73fe\u5728 MSSQL\u3001Oracle\u3001MySQL\u3001\u304a\u3088\u3073 Access \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b SQL \u30c0\u30a4\u30a2\u30ec\u30af\u30c8\u3002 sql: SQL \u30b3\u30fc\u30c9\u3092\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/code><\/pre>\n<h4 class=\"wp-block-heading\">\u30b9\u30c6\u30c3\u30d7 2: \u30d7\u30ed\u30ad\u30b7 \u30af\u30e9\u30b9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b<\/h4>\n<p>\u6b21\u306b\u3001\u81ea\u52d5\u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u30a8\u30f3\u30c8\u30ea \u30dd\u30a4\u30f3\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"wp-block-code\"><code>C:&gt;csc \/t:\u30e9\u30a4\u30d6\u30e9\u30ea c:SQLFormatterWebService.cs<\/code><\/pre>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb SQLFormatterWebService.dll \u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4 class=\"wp-block-heading\">\u624b\u9806 3: ASP.NET \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b<\/h4>\n<p>\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 sqlformatter.aspx \u306f\u3001SQL Formatter Web \u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"wp-block-code\"><code>&lt;%@Assembly Name=&quot;SQLFormatterWebService&quot; %&gt;\r\n\r\n&lt;html&gt;\r\n   &lt;head&gt;\r\n      &lt;title&gt;SQL Formatter Web \u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30e2 &lt;\/title&gt;\r\n   &lt;\/head&gt;\r\n\r\n   &lt;body&gt;\r\n    &lt;form runat=&quot;server&quot; action=&quot;&quot;&gt;\r\n          &lt;asp:textbox id=&quot;inputsql&quot; text=&quot;select f1,f2 from t1&quot;\r\n                       textmode=&quot;MultiLine&quot; rows=&quot;10&quot; columns=&quot;60&quot;\r\n                       wrap=&quot;False&quot; runat=&quot;server&quot;\/&gt;\r\n   &lt;br&gt;&lt;asp:button text=&quot; Format Code &quot; onclick=&quot;onFormat&quot;\r\n                          runat=&quot;server&quot; \/&gt;\r\n          &lt;br&gt;&lt;asp:textbox id=&quot;outputsql&quot; textmode=&quot;MultiLine&quot;\r\n                           rows=&quot;10&quot; columns=&quot;60&quot; wrap=&quot;False&quot;\r\n                           runat=&quot;server&quot;\/&gt;\r\n\r\n   &lt;input type=&quot;hidden&quot; name=&quot;trp-form-language&quot; value=&quot;jp&quot;\/&gt;&lt;\/form&gt;\r\n   &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n&lt;script language=&quot;c#&quot; runat=&quot;server&quot;&gt;\r\n   void onFormat (Object sender, EventArgs e)\r\n{\r\n      SQLFormatterWebService sqlformatter =\r\n         new SQLFormatterWebService();\r\n      outputsql.Text =\r\n         sqlformatter.beautifySql(&quot;mssql&quot;,inputsql.Text);\r\n}\r\n&lt;\/script&gt;<\/code><\/pre>\n<h4 class=\"wp-block-heading\">\u624b\u9806 4: IIS \u30b5\u30fc\u30d0\u30fc\u3067\u3053\u306e ASP.NET \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b<\/h4>\n<ul>\n<li>4.1 \u305f\u3068\u3048\u3070\u3001sqlformatter.aspx \u3092 wwwroot \u306e\u4e0b\u306b\u7f6e\u304d\u307e\u3059\u3002<\/li>\n<li>4.2 SQLFormatterWebService.dll \u3092 wwwroot \u306e\u4e0b\u306e bin \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002<\/li>\n<li>4.3 \u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304d\u3001http:\/\/localhost\/sqlformatter.aspx \u3068\u5165\u529b\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u697d\u3057\u3081\uff01<\/p>\n<h3 class=\"wp-block-heading\">\u8208\u5473\u304c\u3042\u308b\u70b9<\/h3>\n<p>\u3053\u306e SQL Formatter Web \u30b5\u30fc\u30d3\u30b9\u306f\u3001\u7279\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u95a2\u9023\u306e Web \u30b5\u30a4\u30c8\u306e\u30d5\u30a9\u30fc\u30e9\u30e0\u3067\u5e83\u304f\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30d5\u30a9\u30fc\u30e9\u30e0\u3067\u306f\u3001\u591a\u304f\u306e SQL \u30b3\u30fc\u30c9\u304c\u8b70\u8ad6\u306e\u305f\u3081\u306b\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u3063\u3066\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u6295\u7a3f\u3059\u308b\u524d\u306b\u3001\u3053\u306e SQL \u30b3\u30fc\u30c9\u3092\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u304d\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u306b\u95a2\u5fc3\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u6b21\u306e\u30b5\u30a4\u30c8\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li>SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf Web \u30b5\u30fc\u30d3\u30b9<\/li>\n<li><a href=\"http:\/\/www.wangz.net\/gsqlparser\/sqlpp\/sqlformat.htm\">\u7121\u6599\u306e\u30aa\u30f3\u30e9\u30a4\u30f3 SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf<\/a><\/li>\n<li><a href=\"http:\/\/www.sqlparser.com\/\">SQL \u30d5\u30a9\u30fc\u30de\u30c3\u30bf\u3067\u4f7f\u7528\u3055\u308c\u308b SQL \u30d1\u30fc\u30b5\u30fc \u30a8\u30f3\u30b8\u30f3<\/a><\/li>\n<\/ul>\n<\/div><\/div><\/div><style type=\"text\/css\">.fusion-body .fusion-builder-column-0{width:100% !important;margin-top : 0px;margin-bottom : 0px;}.fusion-builder-column-0 > .fusion-column-wrapper {padding-top : 0px !important;padding-right : 0px !important;margin-right : 1.92%;padding-bottom : 0px !important;padding-left : 0px !important;margin-left : 1.92%;}@media only screen and (max-width:1024px) {.fusion-body .fusion-builder-column-0{width:100% !important;}.fusion-builder-column-0 > .fusion-column-wrapper {margin-right : 1.92%;margin-left : 1.92%;}}@media only screen and (max-width:640px) {.fusion-body .fusion-builder-column-0{width:100% !important;}.fusion-builder-column-0 > .fusion-column-wrapper {margin-right : 1.92%;margin-left : 1.92%;}}<\/style><\/div><style type=\"text\/css\">.fusion-body .fusion-flex-container.fusion-builder-row-1{ padding-top : 0px;margin-top : 0px;padding-right : 0px;padding-bottom : 0px;margin-bottom : 0px;padding-left : 0px;}<\/style><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/posts\/3471"}],"collection":[{"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/comments?post=3471"}],"version-history":[{"count":4,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/posts\/3471\/revisions"}],"predecessor-version":[{"id":3475,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/posts\/3471\/revisions\/3475"}],"wp:attachment":[{"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/media?parent=3471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/categories?post=3471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gudusoft.com\/jp\/wp-json\/wp\/v2\/tags?post=3471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}