Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is there an SQL to create a view that will normalize a denoramlized table?
Tony,
Try this. Create a small table with 24 rows in it. Number them 1 ... 24.
Join the table to your denormalized table.
This will give you the same row 24 times,
use the decode on the column with 1 ... 24 so that it displays the field that you want
e.g. decode( a_1_to_24, 1 , time1,
2, time2, etc )
Hope this helps,
Cheers,
Peter Crompton
Email: Peter_crompton_at_yahoo.com
Web: http://www.pitchmark.demon.co.uk/case.htm
tony <ramdan_at_mailexcite.com> wrote in message
news:1HYn3.4545$x7.228281_at_newscene.newscene.com...
> we have a table that is normalized 24 hourly reading in one row
>
>
> id date hour1 hour2 .. hour24
>
>
> we need to create a view that is normalized.
>
>
> id date hour1
> id date hour2
>
>
> any help please!
Received on Thu Jul 29 1999 - 15:42:02 CDT