add dummy rows

From: Ls Cheng <exriscer_at_gmail.com>
Date: Fri, 24 May 2013 10:20:25 +0200
Message-ID: <CAJ2-Qb-5cLs=WAt7By=b2FxREiTH455PwbWtbf=6Ys6hMJfZ4g_at_mail.gmail.com>



Hi all
Does anyone know a way to add "dummy" rows to a resultset?

I have current result:

  • C1 C2 MYDATE ---------- ---------- --------- 1 100 24-MAY-13 2 200 24-MAY-13 2 201 24-MAY-13 3 300 24-MAY-13 4 400 24-MAY-13 6 600 24-MAY-13 1 150 25-MAY-13 2 250 25-MAY-13 3 350 25-MAY-13 4 450 25-MAY-13 5 550 25-MAY-13 7 750 25-MAY-13*
mydate is the column which "partitions" the results, for example for 24 of MAY I must have 7 rows, and 25 of MAY 7 rows. The result should look like:
*

        C1 C2 MYDATE C1_AUX

---------- ---------- --------- -----
         1        100 24-MAY-13 1
         2        200 24-MAY-13 2
         2        201 24-MAY-13 2
         3        300 24-MAY-13 3
         4        400 24-MAY-13 4
                                5
         6        600 24-MAY-13 6
                                7
         1        150 25-MAY-13 1
         2        250 25-MAY-13 2
                                2
         3        350 25-MAY-13 3
         4        450 25-MAY-13 4
         5        550 25-MAY-13 5
                                6
         7        750 25-MAY-13 7*

Anyone know how to accomplish this :-?

Thanks

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 24 2013 - 10:20:25 CEST

Original text of this message