Helps the subtraction of two different lines

Hi all... Beginner here... :)
I have a table in which I have to subtract two different dates for the idle time.
I need to subtract the evnt_end to evnt_start to get the difference concerning the duration of inactivity...
Thanks for your help...

Here is an example of the table:

EVNT_ID... * EVNT_START *... * EVNT_END *.
..... 12:34:30 1...6/22/2010... 2010-06-22 18:36:06
..... 21:58:38 2...6/22/2010... 2010-06-23 04:02:11
..... 05:10:43 3...6/23/2010... 2010-06-23 11:08:13
..... 4...6/23/2010 12:22:24... 2010-06-23 18:21:17
..... 22:29:03 5...6/23/2010... 2010-06-24 04:28:11

I have another question, is there a function that can still give me the result in which it is in the format hh: mm:?

select
evt_id, evt_start, evt_end,
to_char( trunc(sysdate) + (evt_start - lag(evt_end) over (order by evt_id)),'HH24:MI:SS') idle_time
from yourtable
order by evt_id;

Tags: Database

Similar Questions

  • Corner of mitre of two different line thicknesses

    Can someone advise please how to clean a corner with two different line thicknesses? When I Zoom lines mitre not as you wish, they both just to finish. The lines are a 10 PT and pt 2, drawn at the intersection at 135 degrees.

    Thank you very muchCapture.PNG

    Because they are not connected and have different stroke widths you can not get an angle.

    Convert the path traced thick contours (object > path > Outline Stroke) and adjust the end.

  • view the code for two different pages at a time

    HI - in other editors I've used I've always been able to implement the code for two different pages so that I can watch side by side to compare. I can't find a way to do this in Dreamweaver. Anyone know if this is possible?
    Thank you

    Found. Always after asking for help! This is the "cascade" in the Windows menu.
    Thanks anyway!

  • What happens if I am connected to the internet through two different sources or more?

    What happens if I am connected to the internet through two different sources or more?

    You get Internet from two sources. What did you expect to happen?

    This is not double the speed of anything...

  • Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different with different

    Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different files with different after encoding names?

    Located in and out on a section and that export brands.

    .. .Rinse and repeat for the other section.

    Name each section and where it is exported to separately... and as you wish

  • How to track the message to two different queue using jms proxy service

    Hi all
    In my project, I need to listen to a jms queue, then forward the messages to the queue of two different.
    Now, I already have a proxy for listening to the queue and then pass it to another queue using business service, it works.
    But how to forward messages to two different queues in the same workflow process using a proxy and bs?

    or in any other way?

    Really thanks in advance.

    Kind regards

    Kahlil

    You can use actions to publish in the pipeline to achieve this.

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • Compare the values of the XMLType column to two different lines using XMLDiff in GR 11, 2

    I have a table of data with a row of XMLType and I need a way to compare the XML data against the other. I guess I could use a function and return a XMLDIFF base output to the caller, but the function logic is a bit fuzzy. Would be nice to format the output finally in a table format.

    I looked on http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions241.htm#SQLRF20025 and output in a format of table as shown in Re: how to find compare and identify between xmldocs .

    I ran across some examples do not explain the best way to compare the XML code that is in the best performing XMLType column.

    Any help would be appreciated.

    Are you referring to different rows in the same table or different tables or?

    Basically, you need to change the example of Odie so that the XMLDiff retrieves the XML from places in Pb, say something like

    XMLDIFF(SELECT aXml FROM table WHERE ...,
            SELECT bXml FROM table WHERE ...)
    

    This allows to avoid bringing the XML of the DB in the client code.

    Don't know if that's what you're looking for, but hopefully it helps a little.

  • The use of two different NICs on the RT?

    Hello world... I am currently working on a project where I have to deal with the problem mentioned in the thread topic: I have a PC with LabVIEW RT which must be able to establish network connections using two different network cards. One will be used to connect via TCP/IP to a host computer that will show you the data transmitted through variables shared; the other communicates with another PC via the Modbus Protocol. The key is that each communication is done through a separate network card.

    So far I could not understand how to set up these two things happen. Does anyone know how to do this? Advice will help you.

    For communication of RT, I use a project of RT standard, with the RT PC, given one of the IPs, and for the part of Modbus, I created a server I/O with a master and a slave. Separately, everything works fine, but when I get them together it does not work.

    Thanks for your help!

    Sorry it took me so long to answer, I've been busy lately... I found a solution to this problem that I mentioned, and just in case anyone has similar problems in the future, I will briefly describe what happened.

    Caseyw suggested, he had to allow both NICs through the measurement and Automation Explorer. The cause of the failure of connections was in fact that I was not using the 'right' for Modbus communication, which was rolled out on the secondary card. The solution was to use the URL Protocol with the correct path in the field, addressing the right IP address. To avoid making this post a mixture of subjects, I do more futher, but I got the gist of it, so if someone has similar problems when I work with multiple network cards or Modbus communication protocols, do not hesitate to contact me, I'll be happy to help you.

    Thank you

  • Audition performs the subtraction of two signals?

    I'm just surprised that this feature is not widespread among all sound editing software out there.

    Just as we are able to perform the SUM of 2 channels (i.e. mix), we should be able to perform their SUBTRACTION.

    TIA,

    -Ramon

    Travis,

    It may be late to answer you, but yes you can. Simply to "reverse" a copy of your file wav and "Mix dough/overlap" with the original. The result will be 0.

    Now if you have two different recording, one for an A + B signal and the other with report to subtract B which is a bit more complicated because the two recording received these signals of different paths. This is likely to lead to the difference in frequency response and phase. Lets assume that it is not the case, you will first need to align the two record sources. You can do this in audition 3 using the convolution product, as shown in this video:

    How to make the audio loop perfect using Adobe Audition - YouTube

    Then, reverse the recording with the B signal and 'Paste Mix' together.

    You can do more research on adaptive filtering and the RMS, LMS filter if you want to compensate for the different audio track.

    Good luck!

  • Need to query the result with two different of a same attribute values

    Hi all

    I have a search query where I need the query result when an attribute have two different values (e.g.: want the query result when the attribute 'status' is equal to 1 and 2)

    And also, the user will be able to search by any State result.

    What is the best way to implement this.

    Thank you
    DK

    The solution to this use case is to put the part by default ((statut == 1 ou statut == 2) and: bindUserInput is null) as part of the query and the Pratt of the query to run when a value is entered by the user in a view criteria. East view criteria (Status ==: bindUserInput) and the value of the checkbox to ignore the values null. If the binding variable: bindUserInput is null, only the portion of the query is running, if the binding variable is not null, the display criteria is added at the request of three and three default components will not return any line.

    Timo

  • How to get the value of EV - the diiference between two different columns

    Hello
    I get the difference between the two different columns of two different... as tables (emp.sal - dept.comm)... all I want is I need only the records that a negative gap how get this? Please help me
    Thanks in advance

    If I understand your question right:

    select
      case when emp.sal-dept.comm>=0 then YOUR_VALUE
             else emp.sal-dept.comm
      end difference_value
    from emp,dept...
    

    or do you want to:

    select
      ...
    from emp,dept...
    where emp.sal-dept.comm<0
    

    ?

    Kind regards
    Sayan M.

    Published by: xtender on 19.11.2010 22:29

  • How to use the modules of the series and two different bitrates in FPGA mode on cRIO 9075

    Hello

    I have a project with modules namely NI 9227 (module 1) and NI 9234 (2 Modules)

    The project is running and I use the file writing PDM and found that two channels is in the TDMS file while I download the file using FTP the cRIO.

    1 - my quesition is the addition of a second rate in the FPGA?

    2 - Why is it TDMS connect 6 channels and 4 channels?

    Thank you

    Attached to the project with two screws

    Hello Ihab,

    Sorry for the late response here; just saw this message! If you want to keep synchronized modules then definitely stick with the master configuration and slave for your two modules. Note also that you can taste a little faster with the NI 9234 as your master module (since its time base main internal is 13,1072 MHz instead of the time base of the 9227 12.8 MHz).

    Also, see the tips and information in our troubleshooting guide for the synchronization of the series C with LabVIEW FPGA modules:

    http://zone.NI.com/reference/en-XX/help/373197D-01/target6devicehelp/sync_acq_multiple_modules/

    I hope this helps!

  • Is it possible to have the audio from two different sources and routed to separate outputs at the same time?

    I currently have a string of the guitar signal electric-Rocksmith Real Tone cable - ASIO 4 all help IK Multimedia Amplitube 3.   I would like to know if I could also watch DVD with her while the implementation of the programme of Amplitube with sound.  It would be great that I use the DVD for guitar and play at the same time.   I don't have the signal of two merged as one.  In my mind, I should be able to disable the ASIO devices and use them with DirectX as usual.  I could send the ampitube signal to the headphones and use external speakers for the guitar signal, and use the lessons of speakers for the DVD (or maybe YouTube) laptop on board.

    Is this possible?

    How can I do?

    Toshiba Satellite X 205-S7483

    Jeff

    Yes.  For example, I have my Skype phone calls go to my helmet (normal just plugged in the headset) while my media player plays my speakers.  You can choose your default communication or multimedia devices with a right click on the volume control icon and choosing "playback devices".

    Other programs can also be built to be "to the output current" and allow you to choose the output too.

  • OBIEE: Cannot do the subtraction between two columns

    I would like to see the difference between the expenses of the customer in the current from the previous period. Thus, each row contains data from a single client. And my first field (column A) lists the customer spending in the current field of the era and the second (column B) for the previous period. I tried to calculate the difference in my third field (column C).

    However, given that some of the cells in column A are "null", the respective cells in column C appeared also as "null".
    I tried to convert the column A 0 help ifnull null cells. But the respective cells in column C may not always do the subtraction.

    Help, please! Thanks in advance.

    Hello

    In the column C set Ifnull(Col A) - Ifnull(Col B) try this. I tried and it works for me.

Maybe you are looking for

  • Lenovo y510p

    Hey everybody. I'm going to buy a lenovo y510p very soon, but I want to assure you that the model I bought has a SLI. Which models have by SLI? I'm looking everywhere and it is said that "up to two Nvidia 755 graphics cards. But where can I get these

  • reference on graph line

    Hi all I know this question has been asked before. I did some research and still not get the attached vi to work properly Would be one of the Knights LV watch the vi and tell me why the two constants on the BD (104 and 360 values) do not display on t

  • Problems with Internet Explorer 9

    I have a Pavilion dv6 Windows 7 Home Premium (configured in the factory) running after several updates to auto to Internet Explorer to the latest version 9, that I can't get several web sites to display properly. When you go to many States to explore

  • What can I do to get Mark to perform better?

    I have acer aspire 5745 core i3 . But my friend got hp Compaq cq42 dual core and its performance rating is 3.4. My is2.2 of course performance is the lowest number on my score. What can I do to get better results?  That is to say increase my rating

  • GPS not trun on

    I disabled the form won't stick GPS location Services area and when I go back to reactivate.  How settings are saved on this screen?  The only thing I can say is that you have to close.  Y at - it a GPS set somewhere else on the phone? -greg