Days between job raised and completed variable

Hi, im new to this website and semi new to Desktop intelligence. i have created a report that returns data by job number (i work at a housing association). the job number has 2 lots of data i am trying to interrogate, one is the time the job number was raised (i.e. 15/04/2008 09:30) and the time the job was completed (i.e. 15/04/2008 15:53), basically if the job is completed within 24 hours then we have hit out target if it is not we have missed, i need to measure this data.
sometimes a job can be put on hold before it is completed. (i.e. raised: 15/04/2008 09:30, on hold 15/04/2008 12:00, completed 15/04/2008 15:53) for some reason the variable doesnt count the jobs if they have gone on hold. so i am now using a new found variable of
"=((ToNumber(FormatDate(<Date Job Completed (Status 3)> ,"HH"))*60)(ToNumber(SubStr(FormatDate(<Date Job Completed (Status 3)> ,"HH:mm:ss") ,4 ,2)))+(DaysBetween(<Date & Time Job Raised> ,<Date Job Completed (Status 3)>)2460))/1440"
this above one works great however it slightly adds on an hour or two to the answer. (instead of being 0.97 days to complete it returns 1.20 days to complete)
there is no pattern in the extra hours it adds on at all.
can snyone see anything worng with the formual i am now using!?
any help would be appreciated,
thank you
Samantha Brown- Business Analyst

Samantha,
I'm not too keen on DeskI formulas as I usually work in a WebI environment, but an observation in using BusinessObjects tools seems to come up frequently when doing math computations is the need to use a decimal point within a value in order to get more consistent results.  I notice in your formula that you are taking a date and multiplying (24 * 60)/1440, but if you could work it as (24.0 * 60.0)/1440.0)  or you may even need to do something like 1.0((2460)/1440).  The point is in trying to put decimal values (or introduce a decimal value to the formula) and in doing so you will invoke floating point operations and in turn perhaps get more consistent results.  Just a shot in the dark to you as a suggestion....
Thanks,
John

Similar Messages

  • Query on fetching the no.of days between Invoice date and due date in rtf template embedded BI Publisher Report

    Hi Experts,
    We have a requirement to fetch the value of 'No of days' between Invoice date and due date (Two variable date fields on the template) in an Analysis.
    Please let me know the procedure of how to achieve the same.
    Regards,
    Rev

    it's good for ideas but implementation a bit different
    Oracle Business Intelligence Publisher Report Designer's Guide
    This function provides a method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only the Gregorian calendar. The syntax is as follows:
    <?xdoxslt:date_diff(‘format’, ‘YYYY-MM-DD’, ‘YYYY-MM-DD’, $_XDOLOCALE, $_XDOTIMEZONE)?>
    where
    format is the time value for which the difference is to be calculated
    Example:
    <?xdoxslt:date_diff(‘d’, ‘2006-04-08’, ‘2006-04-01’, $_XDOLOCALE, ‘America/Los_Angeles’)?>
    returns
    -7

  • Difference between New Formula and Formula Variable

    Can any body explain what is the difference between  New Formula and Formula Variable.
    Thanks

    Hi,
    Formula:http://help.sap.com/saphelp_nw04/helpdata/en/d3/8057f830a911d4b2be0050dadfb23f/frameset.htm
    Formula Variable:If you want use variables in the formulas of a form, you need to use formula variables. You can use formula variables only in form reports, and must define them in the form itself. They can be replaced in the same ways as text variables when you execute the report.
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db0b1555411d189660000e829fbbd/frameset.htm
    Bye
    Dinesh

  • How to calculate number of days between fixed date and hire date in schema

    i want to calculate the number of days between a fixed date en the hire date (infotype 041)
    If i read the documentation  right, i should use the following command:
    HRS=YDXA02
    Variable 3 (the x) is the fixed data.
    My question is how do i program the variable x?
    Let's say the date 01.01.2008
    Any help would be welcome

    I assume we are talking about PCR for payroll. In this case look at documentation for operation NUM:
    OOOOOO
    Xnnnnn
    X     Table
    nnnnn Table field
    nn    Date type 'nn' from the Date Specifications infotype (0041)
         Date types are taken from table T548Y.
    Your operation would look like:
      NUM=Faaesb
          F          Fixed indicator for deadline calculation
           aa           Date type: Start date of period to be
                        calculated; if the date type is not 'nn,'
                        the second position is left blank.
             e          Unit, in which the duration is calculated:
                        T = days
                        W = week
    s         End date of period to be calculated:
              (blank)  End of current payroll period
              J        End of current calendar year
              A        Start of current calendar year
              B        Start of WPBP period
             No other specifications are possible.
    So it depends on what kind of fixed date you need.
    Hope it helps,
    Carlos.

  • IPlanet Process Manager - What is the difference between Verification Script and Completion Script

     

    Outline calculations include
    • Relationships between members in the database outline:
    Expressed with unary operators (+, -, * , / , %, etc.).• Formulas:
    Expressed by attaching a formula to members in the outline
    calc scripts recommended when:
    Complex logic is required.
    Calculations focus on a subset of the database.
    Specific analytical functions are required.
    Infrequently used calculations, such as year-end processing, thatrequire standard scripts are needed.
    Calculation require functions or commands that work only inscripts

  • Day between two dates excluding Saturday and Sunday

    Hi,
    I have the Requirement like : there are two inputs in query 1)startdate and 2)end date when end user enter the start date and end date the sql query has to retrive the number of days between given start and end dates, and it should be retrivied with two condition 1)all sundays between the above dates excluded 2)second and fourth Saturday of the month in between the start and end dates has to be excluded .
    example start date:01-may-09
    end date: 16-may-09
    expected output:13

    Balaji.M wrote:
    Hope this will be helpful for you.
    SELECT dates,
    TO_CHAR(dates, 'D'),
    TO_CHAR(dates, 'DAY'),
    TO_CHAR(inner.dates, 'W')
    FROM (SELECT TO_DATE('01-may-09') + LEVEL - 1 dates
    FROM DUAL
    CONNECT BY LEVEL <= (TO_DATE('16-may-09') - TO_DATE('01-may-09')) + 1) inner
    WHERE ( ( TO_CHAR(inner.dates, 'D') = 7
    AND TO_CHAR(inner.dates, 'W') NOT IN(2, 4)
    OR TO_CHAR(inner.dates, 'D') not in (1,7)
    You can replace the start date (two place) and end date (one place) by variables and check.Of course we have to be aware of local NLS settings:
    SQL> SELECT dates,
      2  TO_CHAR(dates, 'D'),
      3  TO_CHAR(dates, 'DAY'),
      4  TO_CHAR(inner.dates, 'W')
      5  FROM (SELECT TO_DATE('01-may-09') + LEVEL - 1 dates
      6  FROM DUAL
      7  CONNECT BY LEVEL <= (TO_DATE('16-may-09') - TO_DATE('01-may-09')) + 1) inner
      8  WHERE ( ( TO_CHAR(inner.dates, 'D') = 7
      9  AND TO_CHAR(inner.dates, 'W') NOT IN(2, 4)
    10  )
    11  OR TO_CHAR(inner.dates, 'D') not in (1,7)
    12  );
    DATES     T TO_CHAR(D T
    01-MAY-09 5 FRIDAY    1
    02-MAY-09 6 SATURDAY  1
    03-MAY-09 7 SUNDAY    1
    05-MAY-09 2 TUESDAY   1
    06-MAY-09 3 WEDNESDAY 1
    07-MAY-09 4 THURSDAY  1
    08-MAY-09 5 FRIDAY    2
    09-MAY-09 6 SATURDAY  2
    12-MAY-09 2 TUESDAY   2
    13-MAY-09 3 WEDNESDAY 2
    14-MAY-09 4 THURSDAY  2
    15-MAY-09 5 FRIDAY    3
    16-MAY-09 6 SATURDAY  3
    13 rows selected.
    SQL>Day 1 on my local database is Monday, not Sunday.

  • Function to get differenece between sy-datum and any date entered in days

    Dear Friends;
                    I have to find out the days difference between sy-datum and any valid date that come from table . Is there any function available in SAP that will give me
    the difference in  no. of  days between sy-datum and any date that come from table??
                   please help me out.
    Regards;
    Parag

    Just subtract the dates from each other and you will get the number of days. I have used it and it works prefect
    try this:
    DATA: date1 like sy-datum,
    date2 like sy-datum.
    data I type i.
    date1 = '20070301'.
    date2 = '20070228'.
    i = date1 - date2.
    write: / date1, date2, i.
    date1 = sy-datum.
    date2 = sy-datum - 30.
    i = date1 - date2.
    write: / date1, date2, i.
    SD_DATETIME_DIFFERENCE

  • Calculate Days between same date field in multiple records, looping for each record

    Be patient as I am a newbie to Sql Server (using 2008 R2) and SSIS.  I have looked at multiple solutions in this and many other forums before submitting the question.
    I am looking at records to identify the number of days between two dates.  We review drug information.  A member uses drug A (Code identifies this called GPI) and has refills throughout time.  The goal is to calculate the days between Refill
    1 and refill 2, then refill 2 to refill 3, etc.  When that member record set is complete, we move to the next member record set.
    The basic data would be as follows.  Each record shown below would be a separate record in a single table :
    Member
    Drug Code
          DateService
             Days Between
    1
    A
    3/1/2012
    0
    1
    A
    3/27/2012
    27
    1
    A
    4/21/2012
    26
    1
    A
    6/15/2012
    56
    1
    F
    2/25/2012
    0
    1
    F
    3/20/2012
    25
    1
    F
    4/17/2012
    29
    1
    F
    8/1/2012
    107
    5
    B
    2/15/2012
    0
    5
    B
    3/10/2012
    25
    5
    B
    4/10/2012
    32
    5
    B
    6/28/2012
    80
    5
    B
    7/10/2012
    13
    5
    B
    8/20/2012
    42
    The days between is the value I am looking to calculate.  The First record for the grouping of Member and Drug Code will be zero ( 0 ) as there is no preceding date to calculate against.  The process would then loop through the records at the grouping
    (Member and Drug Code) until those records are calculated.  It would then move on to the next group of Member/Drug records.
    Any assistance would be greatly appreciated.  Any clarification I can provide, I would be more than happpy too.  Thank you in advance!

    TSQL- Finding the difference in days of multiple records in SQL ServerWITH OrderDates AS (
    SELECT
    ROW_NUMBER() OVER (ORDER BY OrderDate DESC) AS RowNumber,
    OrderDate
    FROM OrdersTable
    WHERE SKU = 'AA0000'
    SELECT
    AVG(DATEDIFF(DD, O2.OrderDate, O1.OrderDate)) AS AverageFrequency
    FROM OrderDates O1
    LEFT JOIN OrderDates O2
    ON O2.RowNumber = O1.RowNumber + 1
    Fabio Bilicki

  • How can I calculate the maximum number of days between two dates in a range of dates?

    I have a column of dates spanning the couse of a few months.  I would like to know if I can calculate the maximum number of days between each row and display the highest number.  I currently have another column that calculates the days betwen the rows and I am currently just looking at the totals and highlighting the highest period.
    Is this possible?  Any help or suggestions are appreciated.
    Thank you,
    Trevor

    This sounds totally possible,  Can you post a screen shot of your table to make responding more focused?  If you mean you want to:
    A) compute the difference (in days) between two date in the same row, then
    B) find the max duration (in days)
    Here is my take on this problem:
    D2 = C2-B2
    select D2 and fill down
    F1=MAX(D)
    to perform the conditional formatting (to highlight the max duration) select column D, then set up conditional formatting as shown in the 1st image

  • How to calculate number of days between two date in Template design?

    Hello guys
    I have a situation where I have to create a template that returns data, and one of the thing of the existing report is that there is a column that is actually the number of days between start date and end date columns..
    So in template, how would I be able to do the same? I have start date and end date columns on the template, now when I created another column using expression like end date - start date and preview the template, I am getting errors saying :
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert 03/31/2009 to number.
         at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1534)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:521)
         at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
         at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
    Please advice
    Thanks

    Hi
    There is an extension function you can use, from the javadoc:
    date_diff
    public static long date_diff(java.lang.String format,
    java.lang.String fromDate,
    java.lang.String toDate,
    java.lang.String locStr,
    java.lang.String tzID)
    Method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only Gregorian calendar.
    Parameters:
    format - the format to which the difference is required; allowed formats are y (for Year), m(for month), w(for week), d(for day), h(for hour), mi(for minute), s(for seconds) and ms(for milliseconds)
    fromDate - the first date
    toDate - the second date
    locStr - locale string -> lang-Territory
    tzID - timezone ID ->http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html
    Returns:
    the difference in dates in the desired format
    For example
    <?xdoxslt:date_diff(‘d’,’2009-09-14’, ‘2009-09-20’,’en-US’,1)?>
    give a result of 6
    You can substitute in columns for the dates, just remember the date format required.
    Regards
    Tim

  • Delta and Complete Refresh

    Hi,
    What is significance of Cache Refresh (SXI_CACHE)?
    And what is difference between Delta Refresh and Complete Refresh?
    Thanks and Regards,
    Vijay Raheja

    Hi Vijay,
    You can view all cached objects by running transaction SXI_CACHE.  You can see whether the cache is up-to-date or not.  You can view all cached data and start a manual cache refresh.
    If you suspect that a change in a Integration Directory has not been replicated to the runtime cache, you can refresh the cache manually.  To refresh the cache in SXI_CACHE, from the menu choose XI runtime Cache.
    In a Delta cache all the data are not replicated.  Only the data that is changed from the last cache is updated. 
    Hope this clarifies.
    Regards.
    Praveen

  • Number of days between to dates

    Hello to all,
    I would like to define a formula to calculate number of days between two dates and update the value in a key figure.
    *operand: {Name of keyfigure,Fecha ini (Mes/Año),Fecha Fin (Mes/Año)}
    DATA FECHAINI  TYPE ZIOV_FEIN.
    DATA FECHAFIN TYPE ZIOV_FFIM.
    DATA INI             TYPE 0CALMONTH.
    DATA FIN            TYPE 0CALMONTH.
    DATA DIA_INI      TYPE D.
    DATA DIA_FIN     TYPE D.
    DATA DIAS          TYPE F.
    FOREACH FECHAINI, FECHAFIN.
      INI = FECHAINI.
      FIN = FECHAFIN.
    *C2DATE Determine end period date
      DIA_INI = C2DATE(INI, E).
      DIA_FIN = C2DATE(FIN, E).
      DIAS = DIA_FIN - DIA_INI.
    {ZIOV_DIAS,FECHAINI,FECHAFIN} = DIAS.
    ENDFOR.
    Problem: UPF057 type F conflicts with type D. 
    Help would be much appreciated.
    Regards,
    Patrícia

    The function is built in:
    CALL METHOD CL_RSAR_FUNCTION=>DATE_DIFF(
      EXPORTING I_DATE_1 = L_ARG2
                I_DATE_2 = L_ARG3
      IMPORTING E_RESULT = L_ARG1  )

  • Relationship Job, Task and person

    HI expert.
    I'm coding report of Module HR, my report to show Relationship between Job, task and person.
    but i don't know this relationship. please guide me how to know they replationship on tables ?
    Thanks anh best regards,

    Hi
    All the OM relationship are present in HRP1001 table. Here you can find all the relationship between different object types.
    Thanks
    Sheetal Gupta

  • Difference between Temp table and Variable table and which one is better performance wise?

    Hello,
    Anyone could you explain What is difference between Temp Table (#, ##) and Variable table (DECLARE @V TABLE (EMP_ID INT)) ?
    Which one is recommended to use for better performance?
    also Is it possible to create CLUSTER and NONCLUSTER Index on Variable table?
    In my case: 1-2 days transactional data are more than 3-4 Millions. I tried using both # and table variable and found table variable is faster.
    Is that Table variable using Memory or Disk space?
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Check following link to see differences b/w TempTable & TableVariable: http://sqlwithmanoj.com/2010/05/15/temporary-tables-vs-table-variables/
    TempTables & TableVariables both use memory & tempDB in similar manner, check this blog post: http://sqlwithmanoj.com/2010/07/20/table-variables-are-not-stored-in-memory-but-in-tempdb/
    Performance wise if you are dealing with millions of records then TempTable is ideal, as you can create explicit indexes on top of them. But if there are less records then TableVariables are good suited.
    On Tables Variable explicit index are not allowed, if you define a PK column, then a Clustered Index will be created automatically.
    But it also depends upon specific scenarios you are dealing with , can you share it?
    ~manoj | email: http://scr.im/m22g
    http://sqlwithmanoj.wordpress.com
    MCCA 2011 | My FB Page

  • Start one job after another complets using PL/SQL procedure and DBMS_JOB

    All,
    I am attempting to refresh a materialized view using DBMS_JOB and having a PL/SQL program loop through each materialized view name that resides in a table I created. We do the table because they have to be refreshed in a specific order and I utilize the ORDER_OF_REFRESH column to dictate which MV comes first, second, third, etc.
    Now - I have this working to the extent that it kicks off 4 materialized views (currently set the procedure to only do 4 MVs for testing purposes) but I would ultimately like the procedure to create a new DBMS_JOB that calls DBMS_MVIEW.REFRESH of the next view in line ONLY after the preceeding materialized view DBMS_JOB completes.
    The purpose of all of this is to do a few things. One - if I simply create a procedure with the DBMS_MVIEW.REFRESH call to each materialized view in order - that works but if one fails, the job starts over again and will up to 16 times - BIG PROBLEM. Secondly, we want the job that will call this procedure to fail if it encounters 2 failures on any one materialized view (because some MVs may be dependant upon that data and cannot use old stale data).
    This may not be the "best" approach but I am trying to make the job self-sufficient in that it knows when to fail or not, and doesn't kick off the materialized views jobs all at once (remember - they need to start one after the other - in order).
    As you can see near the bottom, my logic doesn't work quite right. It kicks off all four jobs at once with the date of the whatever LAST_REFRESH is in my cursor (which ultimately is from the prior day. What I would like to happen is this:
    1.) 1st MV kicks off as DBMS_JOB and completes
    2.) 2nd MV kicks off with a start time of 3 seconds after the completion of 1st MV (based off LAST_REFRESH) date.
    3.) This conitnues until all MVs are refresh or until 2 failures are encountered, in which no more jobs are scheduled.
    - Obviously I am having a little bit of trouble with #2 and #3 - any help is appreciated.
    CREATE OR REPLACE PROCEDURE Next_Job_Refresh_Test2 IS
    V_FAILURES NUMBER;
    V_JOB_NO NUMBER;
    V_START_DATE DATE := SYSDATE;
    V_NEXT_DATE DATE;
    V_NAME VARCHAR2(30);
    V_DELIMITER VARCHAR2(1);
    CURSOR MV_LIST IS SELECT DISTINCT A.ORDER_OF_REFRESH,
                                  A.MV_OBJECT_NAME
                        FROM CATEBS.DISCO_MV_REFRESH_ORDER A
                        WHERE A.ORDER_OF_REFRESH < 5
                   ORDER BY A.ORDER_OF_REFRESH ASC;
    CURSOR MV_ORDER IS SELECT B.ORDER_OF_REFRESH,
                                  B.MV_OBJECT_NAME,
                                  A.LAST_REFRESH
                             FROM USER_SNAPSHOTS A,
                                  DISCO_MV_REFRESH_ORDER B
                             WHERE A.NAME = B.MV_OBJECT_NAME
                        ORDER BY B.ORDER_OF_REFRESH ASC;
    BEGIN
    FOR I IN MV_LIST
    LOOP
    IF I.ORDER_OF_REFRESH = 1
    THEN V_START_DATE := SYSDATE + (30/86400); -- Start job one minute after execution time
              ELSE V_START_DATE := V_NEXT_DATE;
    END IF;
         V_FAILURES := 0;
         V_JOB_NO := 0;
         V_NAME := I.MV_OBJECT_NAME;
         V_DELIMITER := '''';
    DBMS_JOB.SUBMIT(V_JOB_NO,'DBMS_MVIEW.REFRESH(' || V_DELIMITER || V_NAME || V_DELIMITER || ');',V_START_DATE,NULL);
              SELECT JOB, FAILURES INTO V_JOB_NO, V_FAILURES
              FROM USER_JOBS
              WHERE WHAT LIKE '%' || V_NAME || '%'
              AND SCHEMA_USER = 'CATEBS';
    IF V_FAILURES = 3
    THEN DBMS_JOB.BROKEN(V_JOB_NO,TRUE,NULL); EXIT;
    END IF;
    FOR O IN MV_ORDER
    LOOP
    IF I.ORDER_OF_REFRESH > 2
    THEN V_NEXT_DATE:= (O.LAST_REFRESH + (3/86400)); -- Start next materialized view 3 seconds after completion of prior refresh
    END IF;
    END LOOP;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
         THEN
              IF MV_LIST%ISOPEN
                   THEN CLOSE MV_LIST;
              END IF;
    NULL;
    END Next_Job_Refresh_Test2;
    ---------------------------------------------------------------------------------------------------------------------

    Justin,
    I think I am getting closer. I have a procedure shown just below this that updates my custom table with information from USER_SNAPSHOTS to reflect the time and status of the refresh completion:
    CREATE OR REPLACE PROCEDURE Upd_Disco_Mv_Refresh_Order_Tbl IS
    V_STATUS VARCHAR2(7);
    V_LAST_REFRESH DATE;
    V_MV_NAME VARCHAR2(30);
    CURSOR MV_LIST IS SELECT DISTINCT NAME, LAST_REFRESH, STATUS
                             FROM USER_SNAPSHOTS
                        WHERE OWNER = 'CATEBS';
    BEGIN
    FOR I IN MV_LIST
    LOOP
         V_STATUS := I.STATUS;
         V_LAST_REFRESH := I.LAST_REFRESH;
         V_MV_NAME := I.NAME;
    UPDATE DISCO_MV_REFRESH_ORDER A SET A.LAST_REFRESH = V_LAST_REFRESH
    WHERE A.MV_OBJECT_NAME = V_MV_NAME;
    COMMIT;
    UPDATE DISCO_MV_REFRESH_ORDER A SET A.REFRESH_STATUS = V_STATUS
    WHERE A.MV_OBJECT_NAME = V_MV_NAME;
    COMMIT;
    END LOOP;
    END Upd_Disco_Mv_Refresh_Order_Tbl;
    Next, I have a "new" procedure that does the job creation and refresh show just below this which, when starting the loop, sets the LAST_REFRESH date in my table to NULL and the STATUS = 'INVALID'. Then if the order of refresh = 1 then it uses SYSDATE to submit the job and start right away, else if it's not the first job, it uses V_NEXT_DATE. Now, V_NEXT_DATE is equal to the LAST_REFRESH date from my table when the view has completed and the V_PREV_STATUS = 'VALID'. I think tack on 2 seconds to that to begin my next job.... See code below:
    CREATE OR REPLACE PROCEDURE Disco_Mv_Refresh IS
    V_FAILURES NUMBER;
    V_JOB_NO NUMBER;
    V_START_DATE DATE := SYSDATE;
    V_NEXT_DATE DATE;
    V_NAME VARCHAR2(30);
    V_PREV_STATUS VARCHAR2(7);
    CURSOR MV_LIST IS SELECT DISTINCT A.ORDER_OF_REFRESH,
                                  A.MV_OBJECT_NAME,
                                  A.LAST_REFRESH,
                                  A.REFRESH_STATUS
                        FROM CATEBS.DISCO_MV_REFRESH_ORDER A
                        WHERE A.ORDER_OF_REFRESH <= 5
                   ORDER BY A.ORDER_OF_REFRESH ASC;
    BEGIN
    FOR I IN MV_LIST
    LOOP
    V_NAME := I.MV_OBJECT_NAME;
    V_FAILURES := 0;
    UPDATE DISCO_MV_REFRESH_ORDER SET LAST_REFRESH = NULL WHERE MV_OBJECT_NAME = V_NAME;
    UPDATE DISCO_MV_REFRESH_ORDER SET REFRESH_STATUS = 'INVALID' WHERE MV_OBJECT_NAME = V_NAME;
    IF I.ORDER_OF_REFRESH = 1
    THEN V_START_DATE := SYSDATE;
    ELSE V_START_DATE := V_NEXT_DATE;
    END IF;
    DBMS_JOB.SUBMIT(V_JOB_NO,'DBMS_MVIEW.REFRESH(' || '''' || V_NAME || '''' || '); BEGIN UPD_DISCO_MV_REFRESH_ORDER_TBL; END;',V_START_DATE,NULL);
    SELECT A.REFRESH_STATUS, A.LAST_REFRESH INTO V_PREV_STATUS, V_NEXT_DATE
    FROM DISCO_MV_REFRESH_ORDER A
    WHERE (I.ORDER_OF_REFRESH - 1) = A.ORDER_OF_REFRESH;
    IF I.ORDER_OF_REFRESH > 1 AND V_PREV_STATUS = 'VALID'
    THEN V_NEXT_DATE := V_NEXT_DATE + (2/86400);
    ELSE V_NEXT_DATE := NULL;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
         THEN
              IF MV_LIST%ISOPEN
                   THEN CLOSE MV_LIST;
              END IF;
    NULL;
    END Disco_Mv_Refresh;
    My problem is that it doesn't appear to be looping to the next job. It worked succesfully on the first job but not the subsequent jobs (or materialized views in this case).... Any ideas?

Maybe you are looking for

  • My iphone 4 is disabled and i need to restore it withou itunes

    my daughter had locked her phone and forgot the password so i need to do a master reset but i cant use itunes cuz i had to reset my computer so i dont have itunes for her iphone how can i do it

  • Instant Portal doesn't display properly in IE6

    IE Version : 6.0.2800.1106CO (SP1, Q823353, 8333989) OS : Windows 2000 I just built an Instant Portal using an XML file as described in the Insant Portal documentation. However, when trying to view it using the browser described above, the page rende

  • MOD_JK and TOMCAT

    Hello, We need to implement a connection to Tomcat through the Apex Apache server. Did anyone implemented mod_jk to connect to tomcat? Thanks, NJ

  • Linking Table to view

    Pulling my hair out here - how do I link a Table to a View?

  • Error in SAP_R3_SelfServiceGenerics_MetaData JCo.

    Hi All,    While checking the ESS home page i get the following error. <b>com.sap.dictionary.runtime.DdException: 'SAP_R3_SelfServiceGenerics_MetaData' not properly defined! Unable to create Metadata connection for Dictionary Provider. Either the log