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: GHouck <hksys_at_teleport.com>
Date: Fri, 30 Jul 1999 00:05:51 -0700
Message-ID: <37A14ECF.6498@teleport.com>


tedchyn_at_yahoo.com wrote:
>
> In article <1HYn3.4545$x7.228281_at_newscene.newscene.com>,
> ramdan_at_mailexcite.com (tony) 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!
> >
> ramdan, looks you have create 24 views
> create or replace views v_hour1 ( ) as select id, date, hour1 etc
> Ted Chyn

Couldn't you do something like:

create view normalView as
(
  select id, date, hour1 from myTable
  union all
  select id, date, hour2 from myTable
  union all
  select id, date, hour3 from myTable
  ...
  select id, date, hour24 from myTable
)

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Fri Jul 30 1999 - 02:05:51 CDT

Original text of this message

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