<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>JunichiIto</author_name>
  <author_url>https://blog.hatena.ne.jp/JunichiIto/</author_url>
  <blog_title>give IT a try</blog_title>
  <blog_url>https://blog.jnito.com/</blog_url>
  <categories>
    <anon>SQL</anon>
  </categories>
  <description>現在かなり複雑なレポーティングクエリを構築しています。 一貫性のない形式で保存されているデータをSQLできれいに整形して出力するレポートなのですが、データ形式のパターンが10種類ぐらいあるんです。 最初にパターン1向けのクエリを作って、それからパターン2用に拡張して、次にパターン3を・・・と作っていったらパターン4のあたりで挫折しました orz メインテーブルを利用するロジックは共通なので、SQL一発で取るようにした方がスマートかなと思ったんですが、だんだんとCASE式とOUTER JOINの乱れ撃ちになってきました。 なぜここでCASE式やOUTER JOINを使ったのか、という意図が自分で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.jnito.com%2Fentry%2F20100812%2F1281563232&quot; title=&quot;複雑なレポーティングクエリをUNIONを使ってリファクタリングする - give IT a try&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-08-12 06:47:12</published>
  <title>複雑なレポーティングクエリをUNIONを使ってリファクタリングする</title>
  <type>rich</type>
  <url>https://blog.jnito.com/entry/20100812/1281563232</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
