Re: Filling up the results of a query
Date: Tue, 15 Apr 2008 05:21:46 -0700 (PDT)
On Apr 14, 8:04 pm, yf..._at_vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote:
> Ed Prochak (edproc..._at_gmail.com) wrote:
> : On Apr 14, 12:41 pm, Hans Mayr <mayr1..._at_gmx.de> wrote:
> : > I need to create a view that "fills up" the entries of a table.
> : > The problem is that I need a value for all durations, not only the
> : > ones I have. So I would like to create a view that calculates (e.g.
> : > interpolates, extrapolates) the rates. Result:
> : Use an inline view like this:
> : select A from (select rownum A from all_objects ) tblA
> : where A <20 ;
> Why an inner query, why not use all_objects directly?
> select my,calculations,including,rownum from all_objects ;
You're right. Obviously I don't use this technique often. I would not limit myself with using just SQL, but instead opting for PL/SQL to solve this kind of problem.
> ALSO, I don't know how many rows are needed, be sure to count all_objects
> in the target database because there are not always as many as you need
> for long periods (yep, I have had that happen, though only on a
> development system).
> Another technique could be to use a pipelined function (never done that
Ed Received on Tue Apr 15 2008 - 07:21:46 CDT