Current Position:Home > How to find gaps(on 10.2)

How to find gaps(on 10.2)

Update:11-30Source: network consolidation
Input Data -
date from to
20.04.2009 5001 5006
20.04.2009 5820 5823
21.04.2009 3121 3124
Required Output -
date gaps
20.04.2009 5002
20.04.2009 5003
20.04.2009 5004
20.04.2009 5005
20.04.2009 5821
20.04.2009 5822
21.04.2009 3122
21.04.2009 3123

The Best Answer

Join your table to a counter table, that has all the integers from 1 to (to_val - from_val):
WITH     cntr     AS
(     -- Begin counter table
     SELECT     LEVEL     AS n
     FROM     dual
     CONNECT BY     LEVEL < = (          -- Begin scalar sub-query to find biggest from-to difference
                                SELECT  MAX (to_val - from_val)
                          FROM    table_x
                            )          -- End scalar sub-query to find biggest from-to difference
                      - 1
)     -- end counter table
SELECT    x.dt
,       x.from_val + c.n     AS gaps
FROM       table_x        x
JOIN       cntr        c     ON c.n < x.to_val - x.from_val
ORDER BY  x.dt
,            c.n;
  • Error message -- "The have a duration of either a zero, or at least 0.4 seconds Update:10-11

    timeline has 2 errors -- and this is what the error says.  Of course I have no idea what the sentence says completely... Have no idea where to look for the fix. The menu used is cityscape modified HD and for main menu and then 2 submenus. CS6 Anyone

  • Error while saving FYV : Gaps in financial year variant periods Update:10-11

    Hello Experts, We are getting an error while saving  a new FYV as: Gaps in financial year variant periods XY Message no. FGV556 Diagnosis The period specification has gaps. The periods must be sequentially numbered without any gaps. System Response O

  • If I get the photography plan does it come with phone gap build (the 25 private apps) or do I need to purchase them seperately Update:10-11

    I have been using the phone gap build service and I noticed that the plans page links to the Creative Cloud plans as well (the ? in the top right). I was wondering if I get the photoshop/lightroom plan if I get access to the paid phone gap build serv

  • Page gap in DW CS6 tutorial. Please help! Update:10-11

    I am getting this gap in my page and it started just after I added this <nav> bar. I have done this lesson several times starting from scratch and it still gives me this gap. I am not sure if the book is missing something or it's me. The book shows

  • Strange gaps in Header and Footer Update:10-11

    Im getting gaps in the header and footer on some of my pages.  Sometimes the gaps are filled with the background color of the colomn and other times they are the body color which is even weirder.  An example link would be

  • How do I Create an Android Certificates for Phone Gap? Update:10-11

    I wanted to know how to create an Android Cerficiate that I can use in Phone Gap. I tried to use the certificate that I created in Flash but apparently Phone Gap is no longer accepting these kinds of certificates. If anyone knows of a straight-forwar

  • How can I get Firefox to fill my screen? There are gaps in the top and bottom of my screen, thanks. Update:10-11

    I dropped my laptop recently and messed up the hard drive so after installing new hard drive I reloaded win 7 and Mozilla Firefox. When Firefox loads up there is a 1" plus gap on the top and a half inch gap at the bottom of all pages. How can I get t

  • Delete and close gap problem Update:10-11

    I have 2 project s  on 1 [delete and close gap] no work why?    on  premiere element 12djvalente What computer operating system is your Premiere Elements 12 running on? Have you updated 12 to the 12.1 Update using an opened project's Help Menu/Update

  • Have a gap in detail of first page and not display group footer on each pag Update:10-11

    Please help me about Memo field in SubReport in CrystalReportXI. I have a SubReport that need to display pageheader, detail, page footer, and  in detail of subreport contains memo field and set the property of this text box to "Can Grow" = Yes .

  • Gap on each page of resume (template) Update:10-11

    Pretty sure I started my resume using the elegant resume template on Pages. With that it created a large "header" for "company name" etc. with decorative line. I have this on my resume with my name above the line and address below the