{"width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20070821%2F1187700834\" title=\"\u307e\u3058\u3067\u3059\u304b - \u3050\u308b\u3050\u308b\uff5e\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2007-08-21 21:53:54","blog_title":"\u3050\u308b\u3050\u308b\uff5e","provider_name":"Hatena Blog","title":"\u307e\u3058\u3067\u3059\u304b","blog_url":"https://bleis-tift.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/bleis-tift/","provider_url":"https://hatena.blog","url":"https://bleis-tift.hatenablog.com/entry/20070821/1187700834","version":"1.0","author_name":"bleis-tift","categories":["SQL"],"height":"190","type":"rich","image_url":null,"description":"7\u6708\u306b\u5354\u529b\u4f1a\u793e\u304b\u3089\u6765\u3066\u3044\u305f\u4eba\u306eSQL\u304c\u3084\u3070\u3044\u3053\u3068\u304c\u5224\u660e\u3002 x A \u6761\u4ef6\u304c\u9055\u3046\u3060\u3051\u306eSELECT\u53e5\u3092UNION ALL\u3067\u3064\u306a\u304e\u307e\u304f\u308b \u305d\u3053\u3089\u3058\u3085\u3046\u306b\u6563\u3089\u3070\u308b\u30ea\u30c6\u30e9\u30eb \u5fae\u5999\u306a\u6761\u4ef6\u5f0f CASE\u5f0f\u306e\u4e2d\u306e\u3059\u3055\u307e\u3058\u3044\u91cd\u8907 \u306a\u3069\u306a\u3069\u3002 1\u756a\u76ee\u306f\u660e\u3089\u304b\u306a\u30d0\u30b0\u3002\u3053\u3044\u3064\u3001\u3088\u304f\u4eca\u307e\u3067\u3053\u308c\u3067\u3084\u3063\u3066\u3053\u308c\u305f\u306a\u3002 2\u756a\u76ee\u306e\u306f\u3053\u3093\u306a\u611f\u3058\u3002 SELECT * FROM SomeTable WHERE Hoge = 0 UNION ALL SELECT * FROM SomeTable WHERE Hoge = 1 3\u756a\u76ee\u30014\u756a\u76ee\u306e\u306f\u3053\u3093\u306a\u611f\u3058\u3002 A.Date >= (CASE WHEN B.Date = 0 THEN '190\u2026"}