Re: Filling in "gaps" in data

From: Jeremy <jeremy0505_at_gmail.com>
Date: Mon, 3 Nov 2008 11:53:35 -0000
Message-ID: <MPG.2378f69d329f69aa98969b@News.Individual.NET>


In article <93b470f9-5000-46d1-9d2c-481123a835c4 @w1g2000prk.googlegroups.com>, alexeydvt_at_gmail.com says...>

> You can make counter without CONNECT BY clause using any big table for
> example DBA_OBJECTS
>
> select ROUND(sysdate, 'MI')+t.i/1440
> from (select rownum i from dba_objects where rownum <1440) t, dual;
>
> COUNTER
>
> 02.11.2008 19:07:00
> 02.11.2008 19:08:00
> 02.11.2008 19:09:00
> 02.11.2008 19:10:00
> 02.11.2008 19:11:00
> 02.11.2008 19:12:00
> 02.11.2008 19:13:00
> 02.11.2008 19:14:00
> 02.11.2008 19:15:00
>
> then You can join this table with you query.
>

Thanks Alex though I am reluctant to join to a table that *may* have sufficient rows.... even if it always does, somehow it seems to be a kludge to introduce a dependency on a table that is not within the control of the application. I knowthe answer to this is to create a table in the application with simply 1000 rows (or however many we need) but that then seems inelegant when compared to the method suggested by Charles which seems to do away with any need to refer to a separate table.

-- 
jeremy
Received on Mon Nov 03 2008 - 05:53:35 CST

Original text of this message