LoginSignup
3
2

More than 3 years have passed since last update.

OracleのModel句でズンドコキヨシ

Last updated at Posted at 2016-03-19

分析関数とmodel句
https://oraclesqlpuzzle.ninja-web.net/oow2009-olap-model.html
を参考にして、Model句で作りました。

select ZunDokoStr || 'キ・ヨ・シ!' as "ズンドコキヨシ"
from dual
model
dimension by(1 as Soeji)
measures(Cast(Null as VarChar2(4000)) as ZunDokoStr)
Rules Iterate(9999) Until (ZunDokoStr[1] Like '%ズン!ズン!ズン!ズン!ドコ!')
(ZunDokoStr[1] = ZunDokoStr[1] 
              || decode(Mod(Dbms_Crypto.RandomNumber,2),1,'ズン!','ドコ!'));

ズンドコキヨシ
------------------------------------------------
ドコ!ズン!ズン!ズン!ズン!ドコ!キ・ヨ・シ!
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2