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: Kevin Fries <kelfink_at_ecst.csuchico.edu>
Date: 29 Jul 1999 22:44:15 GMT
Message-ID: <7nqlfv$98q$1@hubble.csuchico.edu>


In article <1HYn3.4545$x7.228281_at_newscene.newscene.com>, tony <ramdan_at_mailexcite.com> wrote:
>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!

Try a view like:

CREATE VIEW HOURS AS
SELECT ID, DATE, HOUR1
FROM thetable
union all
SELECT ID, DATE, HOUR2
FROM thetable
union all

...
.
.
.

SELECT ID, DATE, HOUR24
FROM thetable
;

That will show 24 rows.
is that what you're looking for?

Kevin Fries
--


Kevin Fries                         kelfink_at_ecst.csuchico.edu
CPD/PB, C Developer/DBA http://www.ecst.csuchico.edu/~kelfink Received on Thu Jul 29 1999 - 17:44:15 CDT

Original text of this message

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