{"id":828,"date":"2010-01-09T23:43:04","date_gmt":"2010-01-09T14:43:04","guid":{"rendered":"http:\/\/www.code-life.jp\/blog\/?p=828"},"modified":"2010-08-08T20:33:44","modified_gmt":"2010-08-08T11:33:44","slug":"%ef%bc%91%e5%b9%b4%e5%88%86%e3%81%ae%e5%b9%b4%e6%9c%88%e6%97%a5%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.code-life.jp\/blog\/2010\/01\/09\/%ef%bc%91%e5%b9%b4%e5%88%86%e3%81%ae%e5%b9%b4%e6%9c%88%e6%97%a5%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b\/","title":{"rendered":"\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092\u751f\u6210\u3059\u308b"},"content":{"rendered":"<p>\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u3001\u5927\u62b5\u306fExcel\u3092\u4f7f\u3063\u305f\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u751f\u6210\u3057\u307e\u3046\u5834\u5408\u304c\u591a\u3044\u3002<\/p>\n<p>\u3053\u306e\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092SQL\u3067\u751f\u6210\u751f\u6210\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aSQL\u6587\u3092\u767a\u884c\u3059\u308c\u3070\u751f\u6210\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"program\"> \/*\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u751f\u6210*\/\r\n select date_format(date_add('20100101', interval(number) day), '%Y%m%d') as yyyymmdd\r\n from (\r\n   select hundred.n + tens.n + ones.n as number\r\n   from (\r\n     select 0 as n union all\r\n     select 1 as n union all\r\n     select 2 as n union all\r\n     select 3 as n union all\r\n     select 4 as n union all\r\n     select 5 as n union all\r\n     select 6 as n union all\r\n     select 7 as n union all\r\n     select 8 as n union all\r\n     select 9 as n\r\n   ) as ones cross join (\r\n     select 0 as n union all\r\n     select 10 as n union all\r\n     select 20 as n union all\r\n     select 30 as n union all\r\n     select 40 as n union all\r\n     select 50 as n union all\r\n     select 60 as n union all\r\n     select 70 as n union all\r\n     select 80 as n union all\r\n     select 90 as n\r\n   ) as tens cross join (\r\n     select 0 as n union all\r\n     select 100 as n union all\r\n     select 200 as n union all\r\n     select 300 as n\r\n   ) as hundred\r\n ) as dummy\r\n where date_format(date_add('20100101', interval(number) day), '%Y%m%d') &lt; '20110101'\r\n order by yyyymmdd asc;<code>\r\n<\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3067\u304d\u308b\u74b0\u5883\u306a\u3089\u3070\u3001\u4e0a\u8a18\u306eSQL\u6587\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u3088\u308a\u3082\u65e9\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u3001\u5927\u62b5\u306fExcel\u3092\u4f7f\u3063\u305f\u308a\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u751f\u6210\u3057\u307e\u3046\u5834\u5408\u304c\u591a\u3044\u3002 \u3053\u306e\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092SQL\u3067\u751f\u6210\u751f\u6210\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306aSQL\u6587\u3092\u767a\u884c\u3059\u308c\u3070\u751f\u6210\u3067\u304d\u308b\u3002 \/*\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u751f\u6210*\/&hellip; <a class=\"more-link\" href=\"https:\/\/www.code-life.jp\/blog\/2010\/01\/09\/%ef%bc%91%e5%b9%b4%e5%88%86%e3%81%ae%e5%b9%b4%e6%9c%88%e6%97%a5%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\uff11\u5e74\u5206\u306e\u5e74\u6708\u65e5\u3092\u751f\u6210\u3059\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/posts\/828"}],"collection":[{"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":5,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions"}],"predecessor-version":[{"id":838,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions\/838"}],"wp:attachment":[{"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/categories?post=828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.code-life.jp\/blog\/wp-json\/wp\/v2\/tags?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}