BETWEEN DATE Query help

Dear Experts, I am new to PL/SQL and need your expert advice and help on below query,
SELECT * FROM SCHEMA.TABLE
WHERE DATETIME BETWEEN (TO_DATE('SYSDATE-1 07:00:01','MM/DD/YYYY, HH24:MI:SS')) AND (TO_DATE('SYSDATE-1 14:59:59','MM/DD/YYYY, HH24:MI:SS'));
I want to automate above query which will select yesterday data from mentioned starttime (07:00:01) to endtime (14:59:59).
Please help.
BR,

Hi,
DBA wrote:
I am using below duration in between to get a complete day duration data (of yesterday),
DTIME BETWEEN TRUNC(SYSDATE-1) + 0/24 + 1/12/60/60 AND TRUNC(SYSDATE-1) + 23/24 + 1799/12/60/60
Is it valid for a complete one day duration (of yesterday)?
Please help in clarifying this confusion.
Bundle of thanks!If you have to ask, then that means it will be hard to debug and maintain.
Here's a simpler way to find rows where dttime is after 7:00 AM yesterday, but before 3:00 PM yesterday:
WHERE     dtime     >  TRUNC (SYSDATE - 1) + ( 7 / 24)
AND     dtime     <  TRUNC (SYSDATE - 1) + (15 / 24)This will pick rows where dtime is as little as 1 second after 7:00 AM, but not 7:00 AM itself. If you want to include 7:00:00 exactly, change the > to >=.

Similar Messages

  • Gaps between dates Query

    Hi,
    I needed to compute the gap time between employments for my database. The problem I am running into right now is I am computing unnecessary calculations. For example,
    Employment table:
    job start date end date
    A 13-01-2000 17-09-2002
    B 25-02-2003 23-07-2004
    C 22-01-2005 15-09-2007
    My query is as follows:
    SELECT A.job as Job1, B.job as Job2, (B.Start_Date - A.End_Date) as Gap_Time
    FROM Employment A, Employment B
    WHERE A.Start_Date != B.Start_Date AND A.End_Date != B.End_Date AND A.End_Date < B.Start_Date;
    The problem is, I should only be getting the gap times between jobs (A,B) and then (B,C), but my query also computes the gap time between A and C (there shouldn't be one though because C does not directly follow job A so that wouldn't be a gap time between jobs). I've tried to mess around with the different types of joins for the FROM part of the query but still haven't been able to figure this out. Thanks.

    Look at the Analytic Functions and specifically the key words LAG and LEAD.
    There is a lot of good advice at http://asktom.oracle.com and some demos in Morgan's Library at www.psoug.org.

  • Display Years between dates - Need Help.!!!

    Dear Reader,
    I need help to resolve this.
    Below are the values stored in table:
    SOME_ID      START_DATE     END_DATE
    1                     15-NOV-2001        04-MAY-2002
    1                     05-MAY-2004        04-MAY-2007
    1                     05-MAY-2007        27-JAN-2008
    2                     07-NOV-1991        02-FEB-1994
    2                     07-NOV-1998        02-FEB-1999
    For example, the query should return as follows :
    For SOME_ID 1:
    SOME_ID        YEARS
    1                      2001
    1                      2002
    1                      2004
    1                      2005
    1                      2006
    1                      2007
    1                      2008
    Kindly help in providing the solution.
    Thanks in Advance.

    with sample_table as (
                          select 1 some_id,to_date('15-NOV-2001','dd-mon-yyyy') start_date,to_date('04-MAY-2002','dd-mon-yyyy') end_date from dual union all
                          select  1,to_date('05-MAY-2004','dd-mon-yyyy'),to_date('04-MAY-2007','dd-mon-yyyy') from dual union all
                          select 1,to_date('05-MAY-2007','dd-mon-yyyy'),to_date('27-JAN-2008','dd-mon-yyyy') from dual union all
                          select 2,to_date('07-NOV-1991','dd-mon-yyyy'),to_date('02-FEB-1994','dd-mon-yyyy') from dual union all
                          select 2,to_date('07-NOV-1998','dd-mon-yyyy'),to_date('02-FEB-1999','dd-mon-yyyy') from dual
    select  distinct some_id,
                     column_value years
      from  sample_table,
            table(
                  cast(
                       multiset(
                                select  to_number(to_char(start_date,'yyyy')) + level - 1
                                  from  dual
                                  connect by to_number(to_char(start_date,'yyyy')) + level - 1 <= to_number(to_char(end_date,'yyyy'))
                       as sys.OdciNumberList
      where some_id = 1
      order by years
       SOME_ID      YEARS
             1       2001
             1       2002
             1       2004
             1       2005
             1       2006
             1       2007
             1       2008
    7 rows selected.
    SQL> SY.

  • Query for between Dates

    Hi,
    Can any body help to write the query between dates in QAF.
    i have writen like this but its is not working
    whereClause.append(" OT_DATE between :");
    // whereClause.append(++bindCount);
    whereClause.append(fromDate);
    // whereClause.append(++bindCount);
    whereClause.append(" AND :");
    whereClause.append(toDate);
    Thanx

    Venkat, u can either use toDate() function in ur sql or use java.sql.Date to convert ur string into date.
    Secondly parameters should be passed through whereclauseparams,like
    java.sql.Date javaSqlDate =
    transaction.getOANLSServices().stringToDate(submitedDateString);
    whereClause.append("DATE_COLUMN_NAME = :1");
    setWhereClauseParams(0,javaSqlDate);
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need help to join two tables using three joins, one of which is a (between) date range.

    I am trying to develop a query in MS Access 2010 to join two tables using three joins, one of which is a (between) date range. The tables are contained in Access. The reason
    the tables are contained in access because they are imported from different ODBC warehouses and the data is formatted for uniformity. I believe this cannot be developed using MS Visual Query Designer. I think writing a query in SQL would be suiting this project.
    ABCPART links to XYZPART. ABCSERIAL links to XYZSERIAL. ABCDATE links to (between) XYZDATE1 and ZYZDATE2.
    [ABCTABLE]
    ABCORDER
    ABCPART
    ABCSERIAL
    ABCDATE
    [ZYXTABLE]
    XYZORDER
    XYZPART
    XYZSERIAL
    XYZDATE1
    XYZDATE2

    Thank you for the looking at the post. The actual table names are rather ambiguous. I renamed them so it would make more sense. I will explain more and give the actual names. What I do not have is the actual data in the table. That is something I don't have
    on this computer. There are no "Null" fields in either of the tables. 
    This table has many orders (MSORDER) that need to match one order (GLORDER) in GLORDR. This is based on MSPART joined to GLPART, MSSERIAL joined to GLSERIAL, and MSOPNDATE joined if it falls between GLSTARTDATE and GLENDDATE.
    [MSORDR]
    MSORDER
    MSPART
    MSSERIAL
    MSOPNDATE
    11111111
    4444444
    55555
    2/4/2015
    22222222
    6666666
    11111
    1/6/2015
    33333333
    6666666
    11111
    3/5/2015
    This table has one order for every part number and every serial number.
    [GLORDR]
    GLORDER
    GLPART
    GLSERIAL
    GLSTARTDATE
    GLENDDATE
    ABC11111
    444444
    55555
    1/2/2015
    4/4/2015
    ABC22222
    666666
    11111
    1/5/2015
    4/10/2015
    AAA11111
    555555
    22222
    3/2/2015
    4/10/2015
    Post Query table
    GLORDER
    MSORDER
    GLSTARTDATE
    GLENDDATE
    MSOPNDATE
    ABC11111
    11111111
    1/2/2015
    4/4/2015
    2/4/2015
    ABC22222
    22222222
    1/5/2015
    4/10/2015
    1/6/2015
    ABC22222
    33333333
    1/5/2015
    4/10/2015
    3/5/2015
    This is the SQL minus the between date join.
    SELECT GLORDR.GLORDER, MSORDR.MSORDER, GLORDR.GLSTARTDATE, GLORDR.GLENDDATE, MSORDR.MSOPNDATE
    FROM GLORDR INNER JOIN MSORDR ON (GLORDR.GLSERIAL = MSORDR.MSSERIAL) AND (GLORDR.GLPART = MSORDR.MSPART);

  • IIf condition between dates using mdx query

    Hi,
    how to check IIF condition between dates using mdx query.
    I able to check single year,plese check below mdx query.I need to check members between years.
    my requirement is member is belongs to between years(2007 to 2010),display "yes" else "NO";
    Could you please give me exact mdx query.
    From,to-2007,2010,if member belongs to 2007to 2010 then disply "yes"else "no".
    how to pass two members in IIf condition.
    WITH
    MEMBER Measures.[test]
    AS Iif([Date].[Calendar Year].currentmember
    is [Date].[Calendar Year].&[2007],"no","yes")
    SELECT {Measures.[test]}
    on 0
    ,[Product].[Subcategory].[Subcategory].MEMBERS * [Date].[Calendar Year].[Calendar Year]
    ON 1
    FROM [Adventure Works]
    indu

    Hi Sriindu,
    consider the following:
    WITH
    MEMBER measures.[test] AS
    IIF
    Exists
    [Date].[Calendar Year].CurrentMember
    [Date].[Calendar Year].&[2007] : [Date].[Calendar Year].&[20010]
    ).Item(0)
    IS
    [Date].[Calendar Year].CurrentMember
    ,"yes"
    ,"no"
    SELECT
    {measures.[test]} ON 0
    [Product].[Subcategory].[Subcategory].MEMBERS
    [Date].[Calendar Year].[Calendar Year] ON 1
    FROM [Adventure Works];
    Philip,

  • Difference between Dates: BW Query???

    Hello all,
    A.I have to get the difference between dates i.e Date1 and Date2.
    I have used a 2 formula variables for each one of them with Replacement path - Key - number as the settings.
    When i execute the difference between the 2 formula variables, i get inconsistent results if the dates are from 2 different months.
    Example(Correct Result)
    Date1 = 14.02.2005
    Date2 = 10.02.2005
    Result = 4
    Example(Incorrect Result)???????
    Date1 = 14.02.2005
    Date2 = 10.01.2005
    Result = 104
    Iam know that system is converting the date as a number like 20040214 and 22040110 and just substracts.....This is not correct....any solution to circmvent this problem???
    B.If iam using a user-exit for variables, how to pass the values Date1 and Date2 to user-exit so that i can calculate the difference of days using a function module.
    I know how to use a user-exit but not sure about working on 2 fields at a time for a formula variable????

    1) For the first problem, I think you should play with the replacement path settings (type, offset,...).  I did this before and I'm sure it worked.
    2) If the variables are entered in the variable screen there is no problem to use a function module (it works with steps --> look at the how-to), but I think you want to calculate not on variables but on the keyfigure values itself, in this case you will have to use virtual characteristics.  There is also a how-to about this, I can't help you with the details my self.
    kr,
    Tom

  • Query for difference between dates

    I know I can use the DATEDIFF
    How can I write it if StartDate and EndDate are in these formats?
    StartDate: 2006-09-20 00:00:00.000
    EndDate:   2013-09-20 18:20:53.000
    I want to find the number of days between dates of dates in the two columns

    Those work great, What if I want to use values from a table?
    I have a column called StartDate and a column called EndDate with dates in it. I just what it to show the StartDate in a column, the Endate in column and the number of days in a column.
    Hi,
    Based on your description, do you want to display the following result?
    USE <DatabaseName>
    GO
    --Create a table named DateTest
    CREATE TABLE DateTest
    (StartDate datetime,
    EndDate datetime
    INSERT INTO DateTest
    VALUES ('2006-09-20 00:00:00.000','2013-09-20 18:20:53.000'),
    ('2007-05-06 12:10:09.000','2008-05-07 12:10:09.000'),
    ('2007-05-07 09:53:01.000','2009-05-08 09:53:01.000'),
    ('2008-08-07 05:53:01.000','2010-08-08 05:53:01.000')
    -- Create another table named DateTest1
    SELECT DateTest.StartDate, DateTest.EndDate,
    DATEDIFF(DAY,DateTest.StartDate,DateTest.EndDate) AS days_number INTO DateTest1
    FROM DateTest
    SELECT *FROM DateTest1
    --Below is the result
    StartDate EndDate days_number
    2006-09-20 00:00:00.000 2013-09-20 18:20:53.000 2557
    2007-05-06 12:10:09.000 2008-05-07 12:10:09.000 367
    2007-05-07 09:53:01.000 2009-05-08 09:53:01.000 732
    2008-08-07 05:53:01.000 2010-08-08 05:53:01.000 731
    Thanks,
    Lydia Zhang

  • Use of  "findByMultipleParameters" for   "OR " between two Query Filters

    Hi,
    I am also working in CE7.1 .I have  a query regarding the use of  "findByMultipleParameters" .
    That is how to use "OR " between two Query Filter condition,because if we add multiple queries into Query Filter List it will by default taking "AND " .
    For an example, I have to pull data from a table/BO with a condition col A = 10 OR ( col B > 100 AND col c = "XYZ") .
    My code snippet looks like given below.......
    List queryFilters = new ArrayList();
    QueryFilter queryFilterOne = QueryFilterFactory.createFilter("ROLLUMBER",Condition.EQ, rollNumber);
    QueryFilter queryFilterTwo = QueryFilterFactory.createFilter("NAME",Condition.EQ, "123");
    queryFilters.add(queryFilterOne);
    queryFilters.add(queryFilterTwo);
    List students = studentServiceLocal.findByMultipleParameters(queryFilters, false, "xyz");
    I have tried all these and found all of them deprecated,Please suggest something appropriate.Your quick response will help a lot.
    //queryFilterOne.setAction(QueryFilter.OPERATION_OR);
    //QueryFilterFactory.createBoolOperator(queryFilterOne.OPERATION_OR);
    //queryFilters.add(QueryFilter.OR);
    //queryFilters.add(queryFilterOne.setOperation(QueryFilter.OPERATION_OR));
    My another Query is what is the role of implCheck(Boolean),findByName(String) in "findByMultipleParameters()" ?
    Thanking you for your help in advance.
    Regards,
    Sonali
    Edited by: Sonali Das on Sep 14, 2010 2:32 PM

    Hi Praveen/Harris,
    As Mr Bhanu said , we can get the result by using formula variable defined on attribute with replacement path as processing type.
    There is document in https://websmp101.sap-ag.de/bi
    in infoindex->How to Calculate with attributes
    To findout the difference between formula variable and current date, define one more formula variable with processing as custoemr exit.And fill this variable with sy-datum or something else.
    with rgds,
    Anil Kumar Sharma .P

  • How to switch between two query in Web templete.

    Hi all,
      Here i am facing problem to switch between two query in web template by using one 'table' web item. is there any way to use hyperlink 'SAP_BW_URL' and we can switch to query. here i am using these HTML code..
    <table><tr><td class="SAPBEXBtnStdBorder" cellspacing="0" cellpadding="0" border="0"><tr><td>
    <table><tr><td class="sapbexbtnstd" ><A href="<SAP_BW_URL cmd='reset_item' item='table_data' query_ID='ZSD_ZSD_M01_Q20' apply_cmd_on_target= "X">" >Switch to other query</A></td></tr></table>
    but i am not getting correct functionality.
    please help me to solve this problem.
    I know the best way to say thanks in SDN.
    thanks
    Kiran Patel

    Kiran,
      Use the web api reset_data_provider as links or in select option in HTML.
       Onchange event of this select option should call JAVASCRIPT method and
       this in turn resets the current dataprovider to your concerned one.
       How to change graphs:
       The graph item has the default data provider:
       <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="CHART_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_CHART"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="TMP_CHART_DATA_HANDLE" value="IIP_49MOXB0UVNOMM6JOZMZU7QO21"/>
             ITEM:            CHART_1
       </object>
      So if you change the DATAPROVIDER_1 using RESET_DATA_PROVIDER to your concerned DP, this changes chart as well !!
       Please use this method and refer to sample code for Onchange Event on SELECT OPTION:
      <HTML>
    <HEAD>
    <script>
    function callDP() {
         if(document.forms[0].dp.value == "1") {
            //form your URL here..
           url = SAP_BW_URL_Get() + "&CMD=RESET_DATA_PROVIDER&DATA_PROVIDER_1=..&...";
            SAPBWOpenURL(url);
            //or docuemtn.location.href = url..
            //etc..
    </script>
    </HEAD>
    <BODY>
    <form>
    <select name="dp" onChange="javascript:callDP();">
    <option value="1">1</option>
    <option value="2">2</option>
    </select>
    </form>
    </BODY>
    </HTML>
    HOPE THIS HELPS !!!

  • Between Date parameter is not working.

    Hi All,
    This is my Dataset query. Other filters are working fine. I am getting out put when i select date range. But Its not working when i select Null Option (That time i should get all the data).  but Its not working.
    SELECT DISTINCT
    PartnerId, [Partner Name], [Partner Site], [Organization/Country Code], [Accreditation Name], [Accreditation Status], [Accreditation Review Date],
    CONVERT(varchar(90), [Accreditation End Date], 105) AS [Accreditation End Date], CONVERT(varchar(90), [Accreditation Start Date], 105) AS [Accreditation Start Date],
    [Accreditation Code], [Specialization Code], Name, Inheritance, Description, Territory, Level
    FROM P1_Addition_Report
    where BU in (@BU) and Level In (@Level) and [Accreditation Name] in (@AccreditationName) and ([Accreditation Start Date] Between @Eligibility_StartDate and @Eligibility_Enddate) or (@Eligibility_StartDate is null and @Eligibility_Enddate is null)
    Can anyone correct this query or suggest any alternatives
    Thanks in Advance

    Thanks for reply. Actually with the code i have pasted i am able to get output for Between date. but the problem is I have 5 Filters . when i select null. Its not considering the filters. Instead of that it is considering all data.
    PFB screenshot for filter.. Please help to rectify this
    See the way I wrote WHERE clause. If you write like that it will still apply the other filters even when date is NULL
    where BU in (@BU) and Level In (@Level) and [Accreditation Name] in (@AccreditationName)
    and ([Accreditation Start Date] >= @Eligibility_StartDate or @Eligibility_StartDate is null)
    and ([Accreditation Start Date] < @Eligibility_Enddate+1 or @Eligibility_Enddate is null)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Diff between sap query and abap query

    diff between sap query and abap query

    Hi,
    ABAP query is mostly used by functional consultants.
    SAP Query :
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query,:
    As far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    regards,
    vasavi.
    reward if it is helpful.

  • Hierarchical Tree Data Query/Record Group Question

    I need help with Hierarchical Forms right now. I'm currently trying to implement a hierarchical tree to display the different items in different categories. I have been reading up on it for the past few days, and i do not understand a few things.
    What is the difference between a data query and record group? they seem the same to me.
    How does the XX = prior XXX work? i understand that this is what connects the parent to the child.
    How do you determine what depth the node is? its done in the record group/data query, but how do i decide what level it is dynamically?
    Thanks a lot in advance!

    Thanks! I am unable to create a table specifically for the tree because i am using tables that have been ported live and are in use. My question about levels is how do I know which depth the node is. For example, i have a category called Information Technology and a category item called Business Informatics. I want to know how to decide that the Category(information technology) is on level 1 and the Item(business informatics) is on level 2.
    Information Technology
    |_
    Business Informatics
    And i do know how the Connect By XX = prior XXX works in the data query/record group.
    Thanks for your help!

  • Finding days in between dates expressed in days.

    Hi, i have a table having a structure similar to this:
    LP1
    TIME_EQ
    P_DAY
    LP2
    17.2
    0
    MONDAY
    16.8
    0.25
    TUESDAY
    17.03
    .5
    THURSDAY
    17
    .75
    FRIDAY
    17.4
    1
    FRIDAY
    16.9
    .25
    SATURDAY
    17.1
    .25
    SATURDAY
    17
    .5
    SUNDAY
    Now, i have two variable dates D1 = October 10, 2013 (Thursday) and D2 = October 13, 2013 (Sunday).
    How do i update my table such that only those rows covered between dates D1 and D2 are updated? In this case, rows where P_DAY in (Thursday, Friday, Saturday, Sunday)  I will use this for my cursor, my query begins with this:
    CURSOR LOAD_PROF is
          SELECT LP1, TIME_EQ, P_DAY
          FROM LOAD_PROFILE_TEST
          WHERE P_DAY in (??? days between D1 & D2).
    I hope you get my point.  Thanks.

    Thank you sir for your response.  This is the start of my query where I will use that:
    DECLARE
          CURSOR LOAD_PROF
          IS
               SELECT LOAD_PROF1,
                             V_TIME,
                             PROFILE_DAY,
                             DECODE(UPPER(PROFILE_DAY),
                                            'MONDAY', 1,
                                            'TUESDAY', 2,
                                            'WEDNESDAY', 3,
                                            'THURSDAY', 4,
                                            'FRIDAY', 5,
                                            'SATURDAY', 6,
                                            'SUNDAY', 7,
                                            'HOLIDAY', 8,
                                            'H_WEEK_T', 9,
                                            'H_WEEK_F', 10)
                                  ORDERBY
               FROM LOAD_PROFILE_TEST
            WHERE SUBSTATION_CODE = :V_SUBSTATION_CODE
                         AND CIRCUIT_CODE = :V_CIRCUIT_CODE
                         AND UPPER(PROFILE_DAY) IN (SELECT UPPER(
                                                                                           TO_CHAR
                                                                                                 :V_DATE + (level-1),
                                                                                                 'fmDAY'))
                                                                               FROM dual
                                                                          CONNECT BY LEVEL <=
                                                                                                           :V_DATE_IN
                                                                                                         - :V_DATE
                                                                                                        + 1 )
               ORDER BY  ORDERBY, V_TIME;
    V_PROF      NUMBER;
    Y_OUT1     NUMBER;
    Y_OUT2     NUMBER;
    Y_OUT3     NUMBER;
    Y_OUT4     NUMBER;
    Y_IN1      NUMBER;
    Y_IN2      NUMBER;
    Y_IN3      NUMBER;
    Y_IN4      NUMBER;
    Y_OUT      NUMBER;
    Y_IN       NUMBER;
    Y_OUT_A     NUMBER;
    Y_IN_A      NUMBER;
    Y_OUT_B     NUMBER;
    Y_IN_B      NUMBER;
    OUT_EXCL    NUMBER;
    IN_EXCL     NUMBER;
    OUT_EXCL_A   NUMBER;
    IN_EXCL_A    NUMBER;
    OUT_EXCL_B   NUMBER;
    IN_EXCL_B    NUMBER;
    UPPER_AREA   NUMBER;
    LOWER_AREA   NUMBER;
    UPPER_AREA_A  NUMBER;
    LOWER_AREA_A  NUMBER;
    UPPER_AREA_B  NUMBER;
    LOWER_AREA_B  NUMBER;
    DURATION   NUMBER;
    BEGIN
    IF :LOAD_DIFF < > 0
    THEN
          FOR UE IN LOAD_PROF
          LOOP
               EXIT WHEN LOAD_PROF%NOTFOUND;
               UPDATE LOAD_PROFILE_TEST
                     SET LOAD_PROF2 = LOAD_PROF1 + :LOAD_DIFF;
          END LOOP;
    ELSE
          FOR UE IN LOAD_PROF
          LOOP
               EXIT WHEN LOAD_PROF%NOTFOUND;
          UPDATE LOAD_PROFILE_TEST
                      SET LOAD_PROF2 = LOAD_PROF1;
          END LOOP;
    END IF;
    COMMIT;
    CALC_UE_AREA(:V_DATE, :V_SUBSTATION_CODE, :V_CIRCUIT_CODE);
    CALC_UE_CUMUL_AREA(:V_DATE, :V_SUBSTATION_CODE, :V_CIRCUIT_CODE);
    The column AREA is dependent from the column LOAD_PROF2, which I got by updating all the row in my cursor. The column CUMUL_AREA in turn, is dependent on the column AREA. After running these 2 procedures, i will now be able to compute for parameters which i need, using extrapolation method on the dates, LOAD_PROF2 & CUMUL_AREA
    Anyways, I will be proceeding with this query for now.  I hope you can give me a better suggestion onhow to better approach my problem.  Thanks very much for your help.  I will now close this thread but again, I will still wait for your suggestion.  Thanks again.

  • Detail differentiation between add query,combined query and sub query

    HI
    I would like to know the detail differentiation between add query,combined query and sub query with  universe
    correct me if I a wrong
    Add query : adding of different query from different universe and also with in same universe.
    Combined query : combining query using operators(Union,intersection,minus)with in same universe.
    Sub query :getting results from the sub query and the result serves as the data for main  query within same universe.

    Hi,
    I would advise you to check the product documentation under http://help.sap.com/
    regards
    Steph

Maybe you are looking for

  • Error in invoking target ntcontab.o of make file ¤ORACLE_HOME/network...

    Hello, Doing an install of an Oracle 8.1.7 database on a Linux SLES8 SP2a After I run the runinstaller, I've a problem ! The message: Error in invoking target ntcontab.o of make file ¤ORACLE_HOME/network/lib/ins_net_client.mk I install the glibc-2.1.

  • Adobe CC/CS6 - Error 16 and no SLStore or PCD File

    Hey all, i was wondering if the Adobe community could help a guy out. My problem is regarding Adobe CC/CS6 on Mac OSX. I have had CS6 for about 2 years and all the apps have worked fine up to now. Yesterday, 3rd Feb 2015, i tried to open photoshop (a

  • Cant copy and paste from a document to an email error says this feature not supported by your browser

    i cannot copy and paste from a document into an email body and a pop up says this feature not supported by your browser

  • Oracle UCM 11g Config with DB

    Hi, I have configured Oracle UCM 11g in oracle sql developer, but am not able to see the tables related to Oracle UCM..(ex: Revisions, Docmeta). Any documentation on this or any one faced this kind of issue. Thanks...

  • Re: Resource files

    I have recently installed the adobe creative suite cs4, upon attempting to load illustrator cs4 I am presented with a message which claims the localized resource files could not be loaded. I have restarted my computer, and tried to reinstall illustra