Subtract two time_clock and get the result minutes

Hi Experts,

Nicely, I would subtract two type of time_clock that varcahr2 to the database and get the minutes of the result.

Data:

Select ' 08:00 ' as start_time_clock, 15:00 ' as the double end_time_clock

Union of all the

Select ' 09:00 ', 16:30 ' of the double

Expected result:

start_time_clock end_time_clock count_minutes

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

08:00                      15:00                       420

09:00                      16:30                       450

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - production


Thanks in advance

WITH dataset

AS (SELECT ' 08:00 ' AS start_time_clock, 15:00 ' AS end_time_clock)

OF THE DOUBLE

UNION ALL

SELECT ' 09:00 ', 16:30 ' DOUBLE)

SELECT (to_date (end_time_clock,'HH24:MI')-to_date(start_time_clock,'HH24:MI')) * 24 * 60))

Of THE dataset

Tags: Database

Similar Questions

  • Add the value of point two apex and display the result in another part of the apex

    Hello

    I need to make the addition of the two item values using apex.item.text and find the result in another apex.item.text.

    For example:
    SELECT
    apex_item. Text(1,null) ONE
    apex_item. Text(2,null) TWO
    apex_item. Text(3,null) RESULT
    FROM EMP
    please suggest me

    Thank you
    Sudhir

    >
    No it does not add the two values in the column, user key to enter the value, it must add the value of the item and displays the result in a dynamic way. Need a suggestion for using javascript
    >
    This requirement was not not clear in the op.

    See the demo of Denes Kubicek.

    This topic is discussed far too often. Have you tried to Oracle Application Express (APEX) and adapting one of the many examples of LoV cascading to your situation?

    See you soon,.

    PS: Tip:
    Look for the p_item_id and p_attributes of the APEX_ITEM API parameters.
    You can call JS functions for example using p_attribute

    APEX_ITEM.TEXT(...
    p_attributes => 'onchange="doTotal(this);"', /* doTotal being your JS Function */
    ...
    

    Published by: Dominic August 16, 2012 11:52

  • Run ViewObject of bean and get the result.

    How can I run my bean ViewObject and get all the lines that jdev ViewObject Return.My Version is 11.1.1.5.0

    I tried to use this way but his return 0 rows, but when I check through Toad query returns data.

    DCIteratorBinding iter =

    getDCBindingContainer () .findIteratorBinding (name);

    iter.executeQuery ();

    Row [] rowArray = iter.getAllRowsInRange ();

    Thank you

    Raul

    Hello

    Its solved now thanks.

    DCIteratorBinding = voIterator

    ADFUtils.findIterator ("MyVObject");

    Object ViewObject = voIterator.getViewObject ();

    object.setNamedWhereClauseParam ("id", String.valueOf (id));

    voIterator.executeQuery ();

    Row [] rowArray = voIterator.getAllRowsInRange ();
    Thank you

    Raul

  • How to perform this procedure and get the result?

    I created a procedure, the source code for the same thing is provided below.

    create or replace procedure vin_test (p_deptno in number
    p_cursor ON SYS_REFCURSOR)
    as
    v_res Emp % rowtype;
    Start
    Open the p_cursor FOR
    Select *.
    WCP
    where deptno = p_deptno;

    end vin_test;

    Now, if I want to see that the out put of this Proc
    I first put the Serveroutput on and then...
    Exec vin_test (10);
    I get an error message indicating an incorrect number of arguments, then someone can tell me what is the value of the parameter I should move on so that I can get the desired output.


    Thanks in advance
    OraCrazy

    In sqlplus you can do like this.

    SQL> create or replace procedure vin_test( p_deptno IN number, p_cursor OUT SYS_REFCURSOR)
      2  as
      3     v_res Emp%rowtype;
      4  begin
      5     open p_cursor for
      6     select *
      7       from emp
      8      where deptno = p_deptno;
      9  end;
     10  /
    
    Procedure created.
    
    SQL> var lcur refcursor
    SQL> exec vin_test(30,:lcur)
    
    PL/SQL procedure successfully completed.
    
    SQL> print lcur
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30         10
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30         10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30         10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30         10
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30         10
    
    6 rows selected.
    

    Thank you
    Knani.

  • Subtracting between two dates and see the result as a date

    HII everyone,

    I had to create a procedure that checks the difference of dates in one month...
    I've got is the view of the difference in the form of date itself...


    for example:

    01/03/2012
    01/03/2012
    01/03/2012
    01/05/2012
    01/05/2012
    .
    .
    so now for a full month...

    the output should be as data are missing for the date 01/04/2012...
    is it possible to display the output as given...
    I am new to oracle, help would be much appreciated...
    Thank you..

    Published by: 948895 on August 2, 2012 21:39

    To fill the gaps between the two dates:

    select &&start_date + (level - 1)
    from dual
    connect by level <= (&&end_date - &&start_date)
    /
    

    To generate the dates for one month:

    select trunc(&&start_date, 'MM')) + (level - 1)
    from dual
    connect by level <= to_number(to_char( last(day(&&start_date)))
    /
    

    This example uses SQL * more variable substitution, but you can easily change to use the value of PL/SQL or everything that you need.

    Cheers, APC

  • In subtracting two stamps, and indicating the number of hours between them.

    Hello people,

    I have two tables, each of them has a timestamp column. I want to do a select with a join that will show a column with the number of hours between the two times.

    (I added the columns as timestamp (0) since I have no need for decimals)

    Here's what I have:

    a table name: conc_test

    table information:

    P_DATE---JOB_NO---MIX---POUR_NO---AMB_T---CONC_T--SLUMP---AIR---DENSITY---CYL_CAST_TIME
    09-MAR-10---9-12-796---80---100309A---2.5---16---135---2.5---2501---09-MAR-10 AM 10.00.00

    the two table name: rls_break

    Info table two:

    JOB_NO---POUR_NO---CYL_ID---SPEC_STR---STR---MIX---BREAK_D_T
    9-12-796---100309A---100309A1---20---27---80---10-MAR-10 07.15.00 AM

    (I put the - between columns, so it would be more readable to reading the forum, FYI)

    That's what I was trying to do:

    Select
    rls_break.cyl_id "Cylinder ID",
    rls_break. Mix "Mix."
    trunc(rls_break.break_d_t-conc_test.cyl_cast_time) 'Age. '
    rls_break.spec_str '' appropriate Force. ''
    rls_break. Str "Specimen Strength".
    from rls_break inner join conc_test on rls_break.pour_no = conc_test.pour_no
    where pour_no = '100309A ';.


    I want the column 'Age' to display the total number of hours between (cyl_cast_time of the conc_test column) cast time and pause time (column break_d_t of rls_break)


    I thank the of for any help.
    ...
    extract(day from rls_break.break_d_t-conc_test.cyl_cast_time)*24
     + extract(hour from rls_break.break_d_t-conc_test.cyl_cast_time)
     + extract(minute from rls_break.break_d_t-conc_test.cyl_cast_time)/60
     + extract(second from rls_break.break_d_t-conc_test.cyl_cast_time)/(60*60) "Age",
    ....
    
  • Compare two columns and get the percentage of cells that match

    Hello

    I'm looking to take two columns of data from different tables in the same document, which should have a high enough percentage of boxes and have another cell tabulate the corresponding percentage. I can the of seem to figure out how to do this, but it seems really possible.

    Any help is greatly appreciated.

    Thank you!

    C1 = A1 = B1

    It's shorthand dethrone select cell C1 and type (or copy and paste it here) the formula:

    = A1 = B1

    Select cell C1, copy

    Select the column C, paste

    Select cell E2, and then type 'TRUE '.

    Select cell E3 and then type "FALSE".

    F2 = COUNTIF ($C, E2)

    F3 = COUNTIF ($C, E3)

    G2 = F2÷SUM(F$2:F$3)

    G3 = F3÷SUM(F$2:F$3)

  • How to add two fields and show the result in a third

    All,
    I have 2 InputText field; both are related to the fields of the associated database.

    I want to display the sum of these two fields on a text output.

    I declare the value of the output in this way text link:
    #{sessionScope.PersonalNrBean.summeDB.value + sessionScope.PersonalNrBean.kmGeldMlp.value}

    But I get this error:
    Cannot find resource for bundle java.util.PropertyResourceBundle, key el.convert

    ADF_FACES - 60097:Weitere desKomitees find DEM Fehlerlog einen entry as servers, der mit: ADF_FACES - 60096:Server - Exception while PPR, beginnt #3

    If I declare the value binding to contain the field even two times:
    #{sessionScope.PersonalNrBean.summeDB.value + sessionScope.PersonalNrBean.summeDB.value}
    It works as expected, but it's not really what I need...

    Any ideas?

    Thanks in advance,
    Sergio.

    Edited by: user5414451 the 14.07.2011 02:57

    Try following:

    #{bindings.summeDB.inputValue.value + bindings.kmGeldMlp.inputValue.value}
    

    Jean Lou

  • How to operate the user enter value query and get the result on the text element

    Hello

    I'm really beginning to JDeveloper and ADF, I want to execute the query below, before with forms, I just add: TEXT_NAME to enhance the users entries, what should I do now with ADF, really unclear question and I would be grateful all help with that.

    Select
    NVL (min (substr (a.StartTime, 1, 8)), 0) Service_Start_Time, nvl (sum (a.sessionvolume), 0) Total_Traffic_KB
    Of
    aaa_bill one
    where
    msid =: TEXT_ITEM
    and starttime > = (select max (fee) FROM aaa_bill
    where msid =: TEXT_ITEM and accountreason = 5);

    You can use a form of parameter ADF for this requirement.
    https://blogs.Oracle.com/Shay/entry/combining_multiple_queries_and

  • How to send two requests to separate from OBI and combine the results

    Hi all

    I'm trying to understand how to combine the results of two queries in OBI. Here's the scenario.

    There are three tables, users, security roles however joined a bridge Table Role_User

    Each user has multiple roles, the roles to which a user has access is identified by a column of flag with value T otherwise there F value.

    I am creating an analysis as below

    ID of the user
    Access roles Roles have no access

    Therefore, column 2 shows all roles with indicator T for the particular user and column 2 shows all roles with indicator F for the same user.

    I tried to create two fact tables and using the filter condition on the value of the indicator, but in the analysis, I could use only one at a time. When I add the two columns, I get the error as none of the fact table are compatible with the query request. I would like to hierarchies for dimensions created and assigned in terms of content for all the facts and decreases in intensity.

    Any advice will be highly appreciated.

    Thank you

    Found the solution. I'm posting here in case where someone faced with a similar question.

    I've added the SQL code in the Advanced tab:

    Select A.saw_0 saw_0, A.saw_1 saw_1, B.saw_1 saw_2

    FROM (Select Col1, Col2 FROM Table1 saw_1 saw_0) a LEFT OUTER JOIN

    (Saw_0 select Col1, Col2 saw_1 FROM Table2) B

    on A.saw_0 = B.saw_0

    I created the logic of the facts using the source even with two different filter conditions and were used with a subquery as above

    Ref: OBIEE Interviews: reports

  • I can't sync my phone to my computer and get the message that my phone doesn't have the latest version of Itunes. I downloaded the latest version on my mac, but what I do on my phone. I'm used to be able to synchronize the two.

    I am more able to sync my I phone on my Mac and get the message that my phone cannot be used because it requires a newer version of iTunes. He tells me to go to www.itunes.com to download the latest version of iTunes... I downloaded the latest version on my mac, but what I do on my phone? I used to be able to sync the two and now I can't even download the photos from my phone on my mac...

    iOS9 on a mobile device requires iTunes 12.3 or higher, which in turn requires a computer running OSX 10.8.5 or higher.  Update of the system only checks the updates for the current version of the system you run, but that itself can be updated.  It may or may not be possible to upgrade your computer to the system requirements. Find your computer on the web site of http://www.everymac.com model and near the bottom of the specification of the system section, he will tell what versions of the operating system, it is able to run. If you can not run a newer system, you will not be able to sync this phone to your current computer. If she can run 10.8.5 or higher, you can either buy a download for Apple OSX 10.8 Mountain Lion code online, or you can try to install the free El Capitan OSX 10.11.  El Capitan can run slower on older machines and require the additional purchase of RAM.  Making a big jump in versions of system is also more likely to affect the old software.

    At el capitan Snow Leopard, it will make my macbook is slow?  - https://discussions.apple.com/thread/7412959

    Mountain Lion 10.8 purchase link United States of America - http://www.apple.com/shop/product/D6377Z/A/os-x-mountain-lion

    Mountain Lion 10.8 purchase link U.K. - http://www.apple.com/uk/shop/product/D6377ZM/A/os-x-mountain-lion

    Course OSX Upgrade General information, including configuration required - http://www.apple.com/osx/how-to-upgrade/

  • [LV-&gt; TS] How to run a SEQ file, get the result (PASS/FAIL) and the report file?

    Hello

    I'm looking for the most obvious and simple, LabVIEW:

    1. start the motor Teststand: FACT

    2. get a list of SEQ files to run: FACT

    3 - loop through the list to run each file follows:<- found="" some="" examples="" but="" i="" have="" some="" trouble="" with="" the="" uimessage="">

    http://zone.NI.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/executing_sequences_using_a...

    4. get the result of the execution of the SEQ:<->

    5 retrieve the XML + name of the generated report file path:<- obviously="" not="">

    http://digital.NI.com/public.nsf/allkb/3D3B2358DF9B786B8625789500549A3B

    http://forums.NI.com/T5/NI-TestStand/getting-report-file-path-location-at-execution-in-TestStand-201...

    Here's my current implementation:

    David Koch


  • How to compare data from the two table column by column and connect the result compared to the separate table

    Hello experts...

    I'm new to this forum and Oracle coding complex.

    I have a task in which I want to compare two tables with the same structure, same columns. My Oracle database is 11g Release 2. I want this column-by-column comparison and save the result in a separate table. (say result_table)

    The structure of the table would be as follows:

    SQL > desc emp;

    Name                                      Null?    Type

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

    EMPNO NOT NULL NUMBER 4

    ENAME VARCHAR2 (10)

    JOB                                                VARCHAR2(9)

    MGR                                                NUMBER(4)

    HIREDATE DATE

    SAL                                                NUMBER(7,2)

    COMM                                               NUMBER(7,2)

    DEPTNO NUMBER (2)

    SQL > emp_comp desc;

    Name                                      Null?    Type

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

    EMPNO NOT NULL NUMBER 4

    ENAME VARCHAR2 (10)

    JOB                                                VARCHAR2(9)

    MGR                                                NUMBER(4)

    HIREDATE DATE

    SAL                                                NUMBER(7,2)

    COMM                                               NUMBER(7,2)

    DEPTNO NUMBER (2)

    Both of the tables EMPNO is the primary key.

    I want to compare these two tables based on the EMPNO (EMPNO even is both tables).

    The result log table would be as follows:

    SQL > create table result_table

    2 (check_sr_no, number (5),)

    table_name 3 varchar2 (30),

    ROW_ID 4 varchar2 (20).

    column_name 5 varchar2 (20).

    6 column_data varchar2 (1000).

    compared_by 7 varchar2 (10));

    Table created.

    SQL > alter table result_table

    2 Add the constraint result_table_pk

    3 primary key (check_sr_no);

    Modified table.

    The name of the table and the name of the column will not be hardcoded (based parameter by user)

    I tried to use the dbms_comparison package, but do not find comparison of column to column.

    I also used by using the query operator LESS. It's showing the difference in rank.

    I also went to https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:2151582681236

    Your help will be very appreciated.

    Thank you

    DK

    Tom Kyte has answered this question MANY times over the years. Here are links for its solution

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4934799800346640847

  • Two days ago, I downloaded Adobe Acrobat update for mac desktop. It is registered with Adobe and watch on my account, such as registered. I try to open and get the error message "you are not connected to the internet or your clock is wrong" are all two in

    Two days ago, I downloaded Adobe Acrobat update for mac desktop. It is registered with Adobe and watch on my account, such as registered. I try to open and get the error message "you are not connected to the internet or your clock is wrong" are all two inaccurate statements. I GET NOTHING BUT NOTHING ADOBE 'SUPPORT '.  How can I get just the program open and running?

    Check your hosts file.

    help for that and other adobe.com sure common connection problems read, http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

Maybe you are looking for