Thursday, May 3, 2018

Do you want to draw the Christmas tree???

SQL> set heading off
SQL> set feedback off
SQL> set pagesize 2000
SQL>
SQL> select decode
  2           ( sign(floor(maxwidth/2)-rownum)
  3           , 1, lpad( ' ', floor(maxwidth/2)-(rownum-1))
  4             || rpad( '*', 2*(rownum-1)+1, ' *')
  5           , lpad( '* * *', floor(maxwidth/2)+3))
  6    from all_objects
  7    , (select 40 as maxwidth from dual)
  8    where rownum < floor(maxwidth/2) +5;

                    *
                   * *
                  * * *
                 * * * *
                * * * * *
               * * * * * *
              * * * * * * *
             * * * * * * * *
            * * * * * * * * *
           * * * * * * * * * *
          * * * * * * * * * * *
         * * * * * * * * * * * *
        * * * * * * * * * * * * *
       * * * * * * * * * * * * * *
      * * * * * * * * * * * * * * *
     * * * * * * * * * * * * * * * *
    * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * *
                  * * *
                  * * *
                  * * *
                  * * *
                  * * *

To Srinivas

SQL> select '    *'||chr(10)||'  * * *'||chr(10)||'* * * * *' from dual;

    *
  * * *
* * * * *

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...