<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>unageanu</author_name>
  <author_url>https://blog.hatena.ne.jp/unageanu/</author_url>
  <blog_title>うなの日記</blog_title>
  <blog_url>https://unageanu.hatenablog.com/</blog_url>
  <categories>
    <anon>SQL</anon>
  </categories>
  <description>昨日の続き。User's Forum for DB2 Japan - タイムスタンプを持つテーブルをyear,monthでgroupingしたも...を参考に、共通表式を使った再帰SQLの無限ループを指定階層辿ったら止めるようにしてみます。戦略的には、 再帰して見つけたデータを格納する中間表(X表)に、再帰の深さを格納する「depth」を追加。 depthは最初は0として、配下データの探索の際に「親のdepth+1」を設定する。 その上で、配下の探索条件として「深さが規定値より小さい」という条件をつける。 →これにより、一定の階層以下の配下データは中間表に追加されなくなり、それ配下のデータの探…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20081113%2F1226569271&quot; title=&quot; 再帰SQLの無限ループを指定階層辿ったら止めるようにする - うなの日記&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>http://cdn-ak.f.st-hatena.com/images/fotolife/u/unageanu/20081112/20081112193851.gif</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-11-13 18:41:11</published>
  <title> 再帰SQLの無限ループを指定階層辿ったら止めるようにする</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20081113/1226569271</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
