Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is there an SQL to create a view that will normalize a denoramlized table?

Re: Is there an SQL to create a view that will normalize a denoramlized table?

From: Peter Crompton <Peter_Crompton_at_Yahoo.com>
Date: Thu, 29 Jul 1999 21:42:02 +0100
Message-ID: <933280994.29719.0.nnrp-13.d4e475b6@news.demon.co.uk>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US