A Christmas Query

Posted by Gilles Haro on Oracle Blogs See other posts from Oracle Blogs or by Gilles Haro
Published on Mon, 20 Dec 2010 23:00:00 +0000 Indexed on 2010/12/21 11:57 UTC
Read the original article Hit count: 276

Filed under:

Let’s celebrate Christmas with this absolutely useless query !

with Mx as (select 60 as MaxWidth from dual)
select decode 
        ( sign(floor(MaxWidth /2)-rownum) 
        , 1 
        , lpad( ' ', floor(MaxWidth /2)-(rownum-1)) || rpad( '*', 2*(rownum-1)+1, ' *') 
        , lpad( '* * *', floor(MaxWidth/2)+3)

        ) 
  from all_tables, Mx 
where rownum < floor(MaxWidth /2) + 6;

Merry Christmas !

 

Gilles Haro
Technical Expert - Core Technology, Oracle Consulting

IronManSignature

© Oracle Blogs or respective owner