Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is it possible to make 1 row appear as 3 rows via a view?
One way that would work is to use union.
In the first select grab the info for single month records
UNION
it with a second select in which you grab the info for the first month of 2
month records
UNION
it with a third select in which you grab the info for the 2nd month of 2
month records
If you need help creating the selects email me.
Barry
sdfsdf <dfsdfsd_at_hotmail.com> wrote in message
news:BE3D4.75345$l81.773645_at_newscene.newscene.com...
> We have a monthly billing system that 95% of the time gives us 1
row/month.
> However 5% are multi-month per 1 row. We need a view that allows us to see
the
> 1 multimonth bill as separate bills since we can not change the actual
data
> and we don't want to have data in two places at same time.
>
> each bill has acct number-of-days in period(30 for 1 month, 60 for two),
kwh,
> and bill_usage_month(the month bill was for, however, in multimonth only
last
> month is shown)
>
> bills for june july
> 1 bill
>
> acct address #of days in period kwh bill_uage_month
>
> 123 23 adm 30 100 june99
> 123 23 adm 30 130 july99
>
> multimonth bill 1 row
>
> 123 23 adm 60 200 july99
>
>
> we need
> 123 23 adm 30 115 june99
> 123 23 adm 30 115 july99
>
>
> its ok to divide the kwh number of bills
> we may have from 2 to 12 mulitmonth bills
>
> is this possible or do we need to create a staging table an dinsert into
it
> parsed out rows?
Received on Tue Mar 28 2000 - 00:00:00 CST
![]() |
![]() |