Remove the following lines

Hi all

with tbdate as

(

Select 6 March 2013 08:00 ' date1, n1 10 'x 1' oggetto in all double union '.

"Select 6 March 2013 08:10 ', 20 ' x 2' of all the double union

"Select 6 March 2013 08:20 ', 10 ' x 3' of all the double union

"Select 6 March 2013 08:30 ', 20 ' x 4' of all the double union

"Select 6 March 2013 08:40 ', 10 ' x 5' of all the double union

"Select 6 March 2013 08:50 ', 30 ' x 6' of all the double union

"Select 6 March 2013 09:00 ', 10 ' x 7' of all the double union

"Select 6 March 2013 09:10 ', 20 ' x 8' of the double

)

Select a.* tbdate one

How can I remove the lines where the total (date1 + numtodsinterval (n1, "MINUTE")) of the previous line does not match the line or the following lines?

With example maybe I'll be more clear

rank 1 03/06/2013 08:00 10 x 1 Yes

rank 2 03/06/2013 08:10 x 30 2 Yes because more time minutes (n1) of the largest previous = 08:10 equal this line

rank 3 03/06/2013 08:20 10 x 3 not because 08:10 + 30 = 08:40 previous line <>this line

rank 4 03/06/2013 08:30 20 x 4 not because 08:10(rows_2) + 30 = 08:40 of the previous lines (2 lines) <>this line

rank 5 03/06/2013 08:40 10 x 5 Yes

tier 6 03/06/2013 08:50 x 20 6 yes because 08:40 plus 10 = 08:50 from the previous row is this line

tier 7 03/06/2013 09:00 10 x 7 no

tier 8 03/06/2013 09:10 10 x 8 Yes

Thanks in advance

Hello

You build the correct path and connect (and then delete the others):

SQL dts@QUALIF > with tbdate like

() 2

3 select to_date (6 March 2013 08:00 ',' dd/mm/yyyy hh24:mi:ss') date1, n1 10 'x 1' oggetto in all double union '.

4 Select to_date (6 March 2013 08:10 ',' dd/mm/yyyy hh24:mi:ss'), 20, 'x 2' dual union all '.

5 Select to_date (6 March 2013 08:20 ',' dd/mm/yyyy hh24:mi:ss'), 10 'x 3' double union all '.

6 select to_date (6 March 2013 08:30 ',' mm/dd/yyyy hh24:mi:ss'), 20 'x 4' double union all '.

7 select to_date (6 March 2013 08:40 ',' dd/mm/yyyy hh24:mi:ss'), 10 'x 5' double union all '.

8 select to_date (6 March 2013 08:50 ',' dd/mm/yyyy hh24:mi:ss'), 20 'x 6' double union all '.

9 select to_date (6 March 2013 09:00 ',' dd/mm/yyyy hh24:mi:ss'), 10 'x 7' double union all '.

10. Select to_date (6 March 2013 09:10 ',' dd/mm/yyyy hh24:mi:ss'), 20 'x 8' from dual '.

(11), a title)

12. Select b.*, sys_connect_by_path (oggetto, '-') pth, connect_by_root (oggetto) r, prior (oggetto) p

tbdate 13 b

14 connect by date1 = prior date1 + prior n1 / 24 / 60

15 beginning with oggetto = 'x 1') '.

16. Select * from a;

DATE1            N1 OG PTH                                                R  P

-------- ---------- -- -------------------------------------------------- -- --

03.06.13         10 x1 -x1                                                x1

03.06.13 20 x 2 - x 1 - x 2 x 1 x 1

03.06.13 20 x 4 - x 1 - x 2 - x 4 x 1 x 2

03.06.13 20 x 6 - x 1 - x 2 - x 4 - x 6 x 1 x 4

03.06.13 20 x 8 - x 1 - x 2 - x 4 - x 6 - x 8 x 1 x 6

Tags: Database

Similar Questions

  • I can't remove the following in the macbook pro.

    Dear friends,

    I can't remove the following in the mac. I have uninstall files, but the image is still on display. They are fuses for OS X, Mac Fuse, image NTFS - 3G in the bottom row of the system preferences. Snapshot is locked.

    By clicking on it, it said to install the updates.

    Kindly Guide.

    Concerning

    Gerard

    Have you tried the steps outlined in section 2 of this page-> https://github.com/osxfuse/osxfuse/wiki/FAQ

  • Delete in af:table always remove the first line when using ExecuteWithParams

    Hello world

    I got a page with master form and af:table two details related to the master. When I'm trying to remove a line in an af:table of detail, it always removes the first line, any line, I selected before. The table has a single = rowSelection and the line is properly visually selected. I remove the line using a "delete hyperlink" on each line, but I first have to select the line. Delete called a bond (or a method at the bean by removing the current line of the iterator, I tried both, none of them work)

    Links page has an ExecuteWithParams defining the correct ID to edit on the master of iterator and an InvokeExecuteWithParams the renderModel value. If I put the refresh condition zero and I hard-code an ID in the binding variable in the model, I am able to delete the selected line.

    In addition, I don't know if this information is useful, but if I set the iterator to PPR ChangeEventPolicy, when I select a line, there always select the first line.

    Any ideas what I could do wrong? Is this a bug?

    I use JDev 11.1.1.7

    Thank you

    Guillaume

    You can try creating a method in ApplicationModule for filter master records instead of executeWithParams?

    Ashish

  • remove the editfield line break

    Hi I have a newline removal of difficulty of editfield. The situation is that I have editfield and the user inserts the body of the text.

    When the user clicks on a button, I want all the characters than insert user to show online with no spacing or no line breaks. I used StringUtilities.removeChar (String, "") to remove the empty spaces, but I don't know how to remove line breaks ("feed").

    Please help and thank you!

    Thanks for the suggestion, but I found a simple way using two Editifields!

  • Get the value of the following line in the game ordered under certain conditions

    Do not know if my best subject line sums up what I do :)


    Oracle DB 12 c (I think 12.1.2)


    I have a table with the names of people and DOB with a few keystrokes. It is assumed that this person is the 'same' first_name, last_name, birth_day/month/year are identical

    drop table people;

    create table persons

    (

    first name varchar2 (30),

    VARCHAR2 (30) last_name,.

    birth_month varchar2 (2),

    birth_day varchar2 (2),

    birth_year varchar2 (4).

    keyVal number

    );

    insert into values('JOHN','SMITH','10','10','1974',1) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('JOHN','SMITH','10','10','1974',2) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('JANE','SMITH','10','10','1974',3) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('JANE','DOE','10','10','1974',4) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('JANE','DOE','10','10','1974',5) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('ERIC','DOE','11','10','1975',6) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('ERIC','DOE','11','10','1975',7) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    insert into values('ERIC','DOE','11','10','1975',8) people (first_name, last_name, birth_month, birth_day, birth_year, keyval);

    I want to see the following output:

    first_name, last_name, birth_month, birth_day, birth_year, keyval_min, keyval_other

    JOHNSMITH101019741 2
    JANEDOE101019744 5
    ERICDOE111019756 7
    ERICDOE111019756 8

    1. the output will display only those who appear at least twice in the original table

    2. If the person appears twice in the original table, the output will only one result where first keyval will be min two; second keyval will be the other value;

    3. If the person has 3 times or more (n times, for example), each line of output will be keyval_min of all keyvals followed by the other value keyval. Total of n-1 lines

    It's very large 100 + M and the processing time is important.

    Hope I explained it well.

    Hello

    This sounds like a job for analytical functions.

    If the same person has N rows in the table, the output should be N - 1 lines.  You can use the ROW_NUMBER analytic function to assign numbers (1, 2, 3,...) to each line and do not display the lines nuimbered 1.

    On each line, you must prove the keyval lowest for this person.  The analytical MIN function can do this.

    Here's one way:

    WITH got_analytics AS

    (

    SELECT first_name, last_name, birth_month, birth_day, birth_year, keyval

    , ROW_NUMBER () OVER (PARTITION BY first_name, last_name, birth_month, birth_day, birth_year)

    ORDER BY keyval

    ) AS r_num

    , MIN (keyval) OVER (PARTITION BY first_name, last_name, birth_month, birth_day, birth_year)

    ) AS keyval_min

    AMONG the people

    )

    SELECT first_name, last_name, birth_month, birth_day, birth_year

    keyval_min

    keyval AS keyval_other

    OF got_analytics

    WHERE r_num > 1

    ORDER BY first_name, last_name, birth_month, birth_day, birth_year

    r_num

    ;

    Use the data DATE to the date information type.  With the help of 3 columns separate NUMBERS will result in complicated, ineffective, code errors and invalid data.

  • Remove the first line xml generated xml to VO

    I am combining multiple xml files to generate the report using BIPublisher. I generated xml based on a VO by using VO.writeXML. How can I remove first row (<? xml version = "1.0"? >) in the xml file?

    Use the transformer and setOutputProperty to omit the first line.

    Transformer transformer = TransformerFactory.newInstance () .newTransformer ();
    transformer.setOutputProperty (OutputKeys.OMIT_XML_DECLARATION, 'yes');

    Edited by: Puthanampatti Dec. 6 2012 18:42

  • Delete the command button to remove the particular line of VO

    Hello

    I dragged & tomb6e a VO jspx page as a table, the data control palette dragged delete operation as a button on the table as the last column.
    By pressing the button Delete, that is, remove top row of VO. I want to remove the delete button w.r.t. specific line on the list of columns...?


    Kind regards.

    Can you confirm if the property table in your bed jsff/jspx selectionListener -
    #{bindings. { . collectionModel.makeCurrent}

  • How to remove the new line?

    Hello

    I read a text file using java and send its contents by mail. I want to remove space (new line) as shown below in line 3. How can I do in java?

    Content of the file text (line numbers for reference)

    Line1: Sales details 1
    Row2: CN P1 C1 E1 1,958
    Line 3:
    4: Sales details 2
    Line5: CN P2 C2 E2 2,529

    Thank you
    K. Henry

    May not be more obvious.

    if(!(members.contains(strLine)) &&!"".equals(strLine.trim()))
    
  • How to remove the jump line, characters and past of a table column?

    HII,

    I m using 4 Apex.
    I m find the problem by removing the line break, characters and captures existing data in the column of the table.


    thnx in advance

    for example

    replace(replace(l_string_var, chr(10)),chr(13))
    

    Best regards
    Marko

    Published by: Marko Goricki, January 17, 2011 10:52

  • How can I remove the dotted lines around the tag?

    If set browser.display.focus_ring_style to zero, I always see the dotted line.
    You can see this problem on this site (when click on the map). But the problem gets more complicated on the other computer everything is normal.

    I see what you mean. There is a pattern once the image has been selected.

  • Re: How to remove the black lines that prints when I use my ADF?

    I have an Officejet 6500 has more.  I only get the double lines when using the document feeder.  Fine when I use the flat bed.  I thoroughly cleaned the glass, and it makes no difference.  Help!

    The ADF in the Officejet 6500 a scanner glass is a bit more difficult to access, but the video in the third step of the second Solution in the here document will show how to clean this area.

  • Remove the duplicate line based on master e-mail

    Hello

    I have a request below that displays the records in doubles because of the tips white space I like how ignore and get a single record.

    Select

    SEPARATE

    MASTER_EMAIL "E-mail account"

    "Name",

    Last_name "Last Name."

    Decode (company_name, NULL, Domain, company_name) "society."

    JOB_FUNCTION "Title."

    Ligne_adresse_1 "address."

    "CITY."

    "STATE."

    'COUNTRY ', HE SAID.

    "Zip, ZIP

    PHONE_NUMBER "phone."

    FAX_NUMBER "Fax."

    CREATED_DATE "created Date."

    FIELD,

    MASTER_FLAG,

    location_company_name

    of master_email_users

    where

    MASTER_EMAIL AS ' [email protected] % %'

    Thank you

    Sudhir

    What I feel is best to remove the white space in the data itself by refreshing the records where we have and making sure that no future records cannot have white space while getting inserted.

    This helps us to avoid additional functions to use in recovery.

  • How to remove the last line of Utl_file

    Hi I have a requirement to write the output to a file. But everything I try the last line is coming as white. I can't understand why UTL_file last blank line as null. Is aby wat to fix this problem?

    /

    Declare

    Lfilehandler Utl_File.File_Type;

    Lfilepath varchar2 (100);

    Varchar2 (100) Lfilename: = "TESTFATCAFILEGEN.txt";

    Lhead VARCHAR2 (2000);

    Begin

    Dbms_output.put_line (' started read directories ");

    SELECT Filepath

    IN Lfilepath

    OF Interfacefileformathdrtbl

    WHERE Interfaceid = "FATCAPREXTFEED";

    Dbms_output.put_line ('found directory');

    Lhead: = ' this is a test generated file to test if the generation of the file that is happening or not. "

    Lfilehandler: = Utl_File.Fopen (Lfilepath, Lfilename, 'W');

    Utl_File.PUTF (Lfilehandler, Lhead |) '\n');

    Utl_File.fclose (Lfilehandler);

    Dbms_output.put_line ('generation of the file is complete");

    exception

    While others then

    Dbms_output.put_line ('down in the generation of file');

    Dbms_output.put_line ("sqlerr" |) SQLERRM);

    End;

    /

    UTL_FILE adds always new line at the end of the file if you use text mode. You must use the byte mode:

    Declare

    Lfilehandler Utl_File.File_Type;

    Lfilepath varchar2 (100);

    Varchar2 (100) Lfilename: = "TESTFATCAFILEGEN.txt";

    Lhead VARCHAR2 (2000);

    Begin

    Dbms_output.put_line (' started read directories ");

    SELECT Filepath

    IN Lfilepath

    OF Interfacefileformathdrtbl

    WHERE Interfaceid = "FATCAPREXTFEED";

    Dbms_output.put_line ('found directory');

    Lhead: = ' this is a test generated file to test if the generation of the file that is happening or not. "

    Lfilehandler: = Utl_File.Fopen (Lfilepath, Lfilename, 'WB');

    Utl_File.Put_RAW (Lfilehandler, UTL_RAW. CAST_TO_RAW (Lhead));

    Utl_File.fclose (Lfilehandler);

    Dbms_output.put_line ('generation of the file is complete");

    exception

    While others then

    Dbms_output.put_line ('down in the generation of file');

    Dbms_output.put_line ("sqlerr" |) SQLERRM);

    End;

    /

    SY.

  • How to remove the blue line, the Date and the name of your Signature blocks?

    We would use esign for documents; However, these documents are dated elsewhere and the signature should not be dated. Is there a way to turn the blue line, power in esign etc on and off? Thank you!

    Hi Lillian,

    Then, it seems you are the user and does not take into account admin. Pouvez you inbox me your email address recorded so I can verify your account?

    Kind regards

    -Usman

  • How can I remove the blue line after the deletion/change the link?

    I deleted the link and delete the text in the url, but still have the blue line, if you're wondering how delete/modify it.

    Generally, you may not. At the time wherever they go to PDF format, the link, text, and line are three things unconnected.

Maybe you are looking for