Delete or update monthly statement cycle

Hi All,
Here i have an issue in monthly statement cycle. The cycle date is every month end of the day. But in Feb it ran on 1st FEB.
(N) Setup > Print > Statement cycle
Name : Monthly
Des : Monthly statement cycle.
Interval: Monthly
Statement date Skip Date Printed
01-MAR-2010 ok 01-MAR-2010
28-FEB-2010 ok ------
01-FEB-2010 ok 01-MAR-2010
31-JAN-2010 ok 31-FEB-2010
Now i want to delete 28-FEB-2010 can any one suggest me
Thanks,
JP

You can use SQL%ROWCOUNT :
TEST@db102 SQL> begin
  2     update emp set sal=3000 where empno=9999;
  3     if sql%rowcount = 0 then
  4             dbms_output.put_line('No update');
  5     end if;
  6* end;
TEST@db102 SQL> /
No update
PL/SQL procedure successfully completed.
TEST@db102 SQL>                                   but insert is different : if insert fails, then an exception is generated.

Similar Messages

  • Insert delete or update entry in Custom table from KONV entry changed

    Hi All,
    I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
    KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
    I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
    As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
    Thanks,

    Thanks for reply,
    There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
    To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
    Is this possible some how? by some database event or something....

  • Sender JDBC adapter : Update SQL Statement : stored procedure

    Hi,
    Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
    The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
    Please let me know if it is possible.
    Thanks,
    Rohit

    you can use a Stored procedure in the
    Query SQL Statement
    You have the following options:
    ·        Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
    ·        Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
    The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
    so have your whole select and update as part of this single Stored procedure

  • Query SQL Statement & Update SQL Statement

    Hi!
    I configure the JDBC adapter sender (XI) to take data from MSSQL database.
    I have to run select like this:
    SELECT
    tblMilestone.Site,
    tblMilestone.Revision,
    tblMilestone.MilestoneNameID,
    tblMilestone.ApprovedDate,
    tblMilestoneName.MilestoneName
    FROM
    tblMilestoneName
    INNER JOIN tblMilestone ON tblMilestoneName.MilestoneNameID = tblMilestone.MilestoneNameID
    WHERE tblMilestone.StatusCode = 1;
    My question is what "Update SQL Statement" I should use in communication channel definition? I only need to update tblMilestone or this two tables?
    Maybe you give me some example.

    Check this from SAP help...
    Update SQL Statement
    You have the following options:
    ●     Enter a valid SQL statement that is to be applied to the database once the data (determined from the Query SQL Statement) has been successfully sent to the Integration Server/PCK.
    It must be an INSERT, UPDATE, or DELETE statement.
    &#9679;     In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.

  • Whats the best way to check table before form deletion or update ?

    Hi, I have a func_staff table made up of a composite key - func_no and staff_id. I have a form where the datablock references this table.
    I need to be able to check that before a func_no and staff_id combination on the form are written to the database that that combination does not already exist in the table.
    What would be the code for that ? I've tried stuff like IF EXIST statements and even a select statement but I totally worded it it wrongly.
    To DELETE an entry in that same table, would the best way to be create an LOV for both func_no and staff_id, the problem with that would be if a user selected a combination that does not exist ? Could I create a combined LOV that would populate each field ?? (this way I could be 100% sure that the selected combination is valid)
    Thanks Peeps.

    hi,
    you can try and use the count(*), before deleting and updating
    lets say
    select count(*)
    into l_count
    from table_name
    where column1 = :block.column1
    and column2 = :block.column2;
    if l_count <> 1
    then
    insert into..........
    else
    show error message;
    raise form trigger failure;
    end if;
    similarly u can use l_count before deleting.
    regards,
    Mayank

  • Bug: halt when deleting unneeded update files

    If WSUS installed on a heavy IO loaded harddrive (LUN) of a VM, when deleting unneeded update files by Server Cleanup Wizard, MMC node may halt.
    Server OS: Windows Server 2012 Standard
    Errors can be located in Event Log:
    An unhandled exception occurred and the process was terminated.
    Application ID: /LM/W3SVC/1881423753/ROOT/ServerSyncWebService
    Process ID: 3288
    Exception: System.NullReferenceException
    Message: Object reference not set to an instance of an object.
    StackTrace:    at Microsoft.UpdateServices.Internal.DataAccess.GetRevisionIdListForCache(Int64 deploymentChangeNumber, Int64& highestChangeNumber, CategoryIdCacheEntry[]&
    newCategoryDeployments, CategoryIdCacheEntry[]& deletedCategoryDeployments, RevisionIdCacheEntry[]& newRevisionDeployments, RevisionIdCacheEntry[]& deletedRevisionDeployments)
    at Microsoft.UpdateServices.Internal.RevisionIdCache.UpdateCategoryAndRevisionIdCache(Int64 deploymentChangeNumberAtRefresh)
    at Microsoft.UpdateServices.Internal.ServerImplementation.UpdateCache()
    at Microsoft.UpdateServices.Internal.ServerImplementation.DatabaseChangeHandler(Object byTimer)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    Application: w3wp.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.NullReferenceException
    Stack:
    at Microsoft.UpdateServices.Internal.DataAccess.GetRevisionIdListForCache(Int64, Int64 ByRef, Microsoft.UpdateServices.Internal.CategoryIdCacheEntry[] ByRef, Microsoft.UpdateServices.Internal.CategoryIdCacheEntry[]
    ByRef, Microsoft.UpdateServices.Internal.RevisionIdCacheEntry[] ByRef, Microsoft.UpdateServices.Internal.RevisionIdCacheEntry[] ByRef)
    at Microsoft.UpdateServices.Internal.RevisionIdCache.UpdateCategoryAndRevisionIdCache(Int64)
    at Microsoft.UpdateServices.Internal.ServerImplementation.UpdateCache()
    at Microsoft.UpdateServices.Internal.ServerImplementation.DatabaseChangeHandler(System.Object)
    at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x50108835
    Faulting module name: KERNELBASE.dll, version: 6.2.9200.16384, time stamp: 0x5010ab2d
    Exception code: 0xe0434352
    Fault offset: 0x00000000000189cc
    Faulting process id: 0xcd8
    Faulting application start time: 0x01cdcff0fa98da3e
    Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: 332ed25c-3c39-11e2-93f1-005056b26389
    Faulting package full name: 
    Faulting package-relative application ID:
    Step to repo:
    1 Open Update Services MMC.
    2 Click Options from the left panel.
    3 Select Server Cleanup Wizard from the right.
    4 Press Next.
    MMC node MAY(only when lots of files need to be deleted) be prompted to be reset when deleting unneeded files if it's running longer than usual. Re-open Update Services MMC will fix it. But
    it will be appeared again another day when many unneeded files exist.
    Eternal Snow

    Nothing to me indicated that his previous disks weren't functional.
    In the very first two lines of the first post of this thread, the drive was described as "heavily loaded". Specifically the scenario was:
    If WSUS installed on a heavy IO loaded harddrive (LUN) of a VM
    Running the Server Cleanup Wizard, particularly performing the "Delete unneeded updates..." action is a highly database intensive action. If that task is competing for IOPS on the disk system, then there's absolutely a high probability that the task
    will "timeout" before the stored proc being called can complete it's task.
    The "fix" is to put the application on a properly equipped machine.
    If the guys who wrote the system can't create it to not fall over if the HDs it's on happen to be a wee bit slow, then yes it's a bug and they've written it badly.
    We're not talking about "a wee bit slow", though, are we?
    As for timeout issues, it's a natural artifact of a WSUS server these days. Read every tenth thread in this forum and somebody is having issues with timeout errors.
    There are two contributing factors. The first is that the number of updates currently contained in the MU catalog is about 100x the number of updates that existed when WSUS v3 was originally written in 2007.
    The second is that in 95% of the cases, the administrator reporting the issue failed to properly performed needed administrative and maintenance activities on the WSUS server over the lifespan of the server.
    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • To access their payslips / monthly statement online

    Hi Experts,
    Pls provide me the inputs for the following
    1) Should allow annuitants (retirees who get annuity payment) to access their payslips / monthly statement online
    2) Should also allow them to update their bank and address information
    3) Should provide a feature for them to download the annuity control declaration form
    what are the trasactions to configure the above said things.....
    Higher point will reward for each answers
    Thanks in advance
    Jasmine

    That all sound like ESS (Employee Self Service) to me.
    I think you can use a Business package
    look at:
    https://www.sdn.sap.com/irj/sdn/developerareas/contentportfolio
    Business Package for Employee Self-Service 4.6C - 4.7
    As far as i remember all the documentation for this BP's is at SAP Marketplace.
    Hope this help!
    Juan Reyes

  • Update Table statement in pre-commit trigger

    Hi,
    I would need to update one table before commit in the form and hence I need to write an update table statement in pre-commit trigger. Can anyone help me with the sample code or how sould i be able to write a Update table statement from form-level trigger. Normal update statement is throwing me errors.
    Thanks in adv

    I wouldn't recommend the PRE-COMMIT trigger unless it is your requirement to execute the UPDATE statement every time the form commits, whether it is updating or inserting or deleting.
    Other wise you can use the PRE-UPDATE, PRE-DELETE and PRE-INSERT triggers; for this case you create a procedure under Program Units node in the Form's navigator that includes your "UPDATE" SQL statement and you call this procedure from the triggers you need to execute it from.
    Example:
    PROCEDURE UPDATE_MYTABLE IS
    BEGIN
      UPDATE MYTABLE SET MY_COLUMN1 = MY_VALUE1,
                                       MY_COLUMN2 = MY_VALUE2,
                                       MY_COLUMN3 = MY_VALUE3
      WHERE ... condition;
    END;
    PRE-UPDATE trigger code:
    BEGIN
      UPDATE_MYTABLE;
    END;Try it and let us know if this is your requirement.
    Tony
    Edited by: Tony Garabedian on Sep 5, 2008 10:29 AM

  • Deletion of Redundant CC Assessment Cycles

    Hi,
    I am trying to delete the existing CC Assessment cycles. These cycles were used during previous months and hence the entries are there in the system with respect to these cycles. Is there any way out to delete these redundant cycles now? Please reply.
    We are getting following message.
    Postings exist for cycle BBFSI2, starting date 01.07.1994
    Message no. GA007
    Diagnosis
    You have chosen the "Delete cycle" function. Cycle BBFSI2, starting date 01.07.1994, which is to be deleted, still has 4 posted and not reversed documents.
    System Response
    The cycle cannot be deleted.
    Procedure
    Check the documents posted. To do this, use the "Overview" function. You may have to reverse these documents before you can delete the cycle.
    Thanks,
    Bijay

    HI,
    an assessment cycle can only be deleted if there are no documents posted using this cycle.
    This can be done by archiving the posted documents (or by reversing it, but I don't think thats what you want to do).
    Best regards, Christian

  • Read-through/write-behind and queued deletes (and updates)

    Hi,
    If I am changing the state of objects in a cache and using the write-behind and read-through mechanism what happens when I have deleted or updated an object in the cache but the change has not yet been committed to the database?.
    If I delete and object in the cache and the delete DB operation is being queued and during this time try and perform a get against the key for the object is the value read through from the database or is it ignored since the database delete is pending?
    For updates I presume that the value in the cache will be used - as the value exists in the cache and a read-through from the database will not be triggered.
    Can you clarify the behavior of Coherence under these circumstances, particularly that of a pending delete.
    Thanks,
    Dave

    Hi Dave,
    If I am changing the state of objects in a cache and
    using the write-behind and read-through mechanism
    what happens when I have deleted or updated an object
    in the cache but the change has not yet been
    committed to the database?.
    If I delete and object in the cache and the delete DB
    operation is being queued and during this time try
    and perform a get against the key for the object is
    the value read through from the database or is it
    ignored since the database delete is pending?I seem to remember a forum post mentioning that the removes from a write-behind cache are performed synchronously (they are done as part of the backingMap.remove(key)) operation so even if there are were pending updates in the write-behind queue. If I remember correctly, then the above mentioned problem cannot happen.
    >
    For updates I presume that the value in the cache
    will be used - as the value exists in the cache and a
    read-through from the database will not be
    triggered.
    Exactly.
    Best regards,
    Robert

  • How do I delete a prior month(s) or entire year(s) in iCal on my iMac (using version 4.0.4 (1395.7)?  Want to delete all months in 2009

    I checked what was previous asked in deleting months from iCal; however, that question pertained to removing events from a month and not necessarily deleting the entire month.  I have three years of calendars (January - December x three) in my iCal and want to delete all months for 2009 and 2010; however, I can't seem to find a way to delete.  I checked preferences/advanced under iCal but no mention of deleting previous months/years.

    Greetings Judith,
    Before making any attempts at deleting calendar data, backup what you have just in case:
    Click on each calendar on the left hand side of iCal one at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    iCal has an automated function located in iCal > Preferences > Advanced > Delete events "X" days after they have passed.  By typing in a value for days you can tell iCal to delete all events before that time frame.
    Example:
    Today is 4-16-2012.
    If I wanted to delete all events prior to 1 year ago (4-16-2011) I would type in "365" for the number of days.
    Once you type in the number of days you want kept in iCal, close the preferences and then quit iCal.
    Re-open iCal and check to see if the events are gone.  If not you may want to leave it open for several minutes and then quit again.
    Once the events are removed go back to  iCal > Preferences > Advanced > Delete events "X" days after they have passed and make sure the check mark is removed to prevent future deletion.
    Hope that helps.

  • Software Update Server - Deleting old updates to make space for new ones

    On Page 77 of the SystemImage_and_SW_Updatev10.4.pdf Apple recommends "deleting old updates to make space for new ones". I've looked and searched and yet to find a way to do this. The Server Admin interface and the command line options I've looked into don't appear to provide this option.
    So I actually tried stopping the server, moving the updates from /usr/share/swupd/html to another location, starting the server, the server wouldn't start, moving the files back again, the server still won't start.
    1. Does anyone know how you're supposed to "Delete old updates to make space for new ones"
    2. Does anyone have any suggestions as to how to get Software Update service running again?
    Power Mac G5   Mac OS X (10.4.7)  

    Does this article contain anything useful?
    (16738)

  • Questions on Xontrol--H​ow to update the state and data

    Hello, everyone. I am new to use the XControl. I don't understand how the program in the facade update the "state" and "Data" after we click the button. I cannot do that, please give me some help on the XControl.
    My vi is in the attachment.
    Message Edited by McArthur on 03-24-2010 02:19 AM
    Working...
    Attachments:
    Button.zip ‏51 KB

    McArthur wrote: Now I understand the reason why the state can not update, because I didn't do as TCPlomp mentioned. It seems working now....
     I mentioned this too, however without a pretty picture.
    quote: 
    When you modify data or state, you need to update the action cluster to indicate that fact.
    McArthur wrote: The example is just a dummy, not really make sense.
    The example is really quite good and shows these things too as well as many other important points. Please try to fully understand it. 
    I would strongly advise you to also look at my other suggestions. You still haven't explained the purpose of the xcontrol. I am still curious.  
    LabVIEW Champion . Do more with less code and in less time .

  • How to update session state from form field values without submitting page?

    Hi,
    I am new to Oracle APEX. I am using Oracle Apex 4.2 on Oracle 11g release 2. The problem is that when I am entering data on a form, when I enter a value in one field and move to the next field, how can I use the value of first field in the validation procedure of next field? I know that when we enter data in fields, the session state is not updated with these values until we submit the page... right... but I have seen that if there is a control of List box type, then Apex gives an option "Action When List changes" where we can choose option to update corresponding session state field with the value of list box item, without submitting the page.
    Now my questions is why this option is only available for List box items? why not for other item types like Text box, Check box,... ? can someone please help me with this?
    (the issue with update of session state depending on page submitting, is that we need a complete network round trip from client to server in order for it. However if we can update session state variables without submitting page, then we can avoid this network traffic).
    Any help will be greatly appreciated. Thanks in advance.

    Create a dynamic action on change and run a PL/SQL process there with the following code:
    BEGIN
       NULL;
    END;Page items to submit > your item.
    This will set the session state without submitting the form.
    Further examples here:
    http://apex.oracle.com/pls/apex/f?p=31517:229
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Creating a better update table statement

    Hello,
    I have the following update table statement that I would like to make more effecient. This thing is taking forever. A little background. The source table/views are not indexed and the larger of the two only has 150k records. Any ideas on making more effecient would be appreciate.
    Thanks.
    Ryan
    Script:
    DECLARE
    V_EID_CIV_ID SBI_EID_W_VALID_ANUM_V.SUBJECT_KEY%TYPE;
    V_EID_DOE     DATE;
    V_EID_POE     SBI_EID_W_VALID_ANUM_V.POINT_OF_ENTRY%TYPE;
    V_EID_APPR_DATE DATE;
    V_CASE_CIV_ID     SBI_DACS_CASE_RECORDS.CASE_EID_CIV_ID%TYPE;
    V_CASE_DOE     DATE;          
    V_CASE_POE SBI_DACS_CASE_RECORDS.CASE_CODE_ENTRY_PLACE%TYPE;
    V_CASE_APPR_DATE           DATE;
    V_CASE_DEPART_DATE           DATE;
    V_SBI_UPDATE_STEP SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP%TYPE;
    V_SBI_CIV_ID SBI_DACS_CASE_RECORDS.SBI_CIV_ID%TYPE;
    CURSOR VALID_CIV_ID_FROM_EID IS
         SELECT EID.SUBJECT_KEY,
              TO_DATE(EID.PROCESS_ENTRY_DATE),
              EID.POINT_OF_ENTRY,
              TO_DATE(EID.APPREHENSION_DATE),
              DACS.CASE_EID_CIV_ID,
              TO_DATE(DACS.CASE_DATE_OF_ENTRY,'YYYYMMDD'),
              DACS.CASE_CODE_ENTRY_PLACE,
              TO_DATE(DACS.CASE_DATE_APPR,'YYYYMMDD'),
              TO_DATE(DACS.CASE_DATE_DEPARTED,'YYYYMMDD'),
              DACS.SBI_UPDATE_STEP,
              DACS.SBI_CIV_ID
         FROM SBI_EID_W_VALID_ANUM_V EID,
    SBI_DACS_CASE_RECORDS DACS
    WHERE DACS.CASE_NBR_A = EID.ALIEN_FILE_NUMBER;
         BEGIN          
              OPEN VALID_CIV_ID_FROM_EID;
    SAVEPOINT A;
              LOOP
                   FETCH VALID_CIV_ID_FROM_EID INTO V_EID_CIV_ID, V_EID_DOE, V_EID_POE,V_EID_APPR_DATE,V_CASE_CIV_ID, V_CASE_DOE,V_CASE_POE,V_CASE_APPR_DATE,V_CASE_DEPART_DATE,V_SBI_UPDATE_STEP,V_SBI_CIV_ID;     
    DBMS_OUTPUT.PUT_LINE('BEFORE');
                   EXIT WHEN VALID_CIV_ID_FROM_EID%FOUND;
    DBMS_OUTPUT.PUT_LINE('AFTER');
              UPDATE SBI_DACS_CASE_RECORDS
    SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_CASE_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 1
    WHERE V_CASE_CIV_ID IS NOT NULL
    AND V_CASE_CIV_ID <> 0;
    UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 2
    WHERE V_SBI_CIV_ID IS NULL AND V_SBI_UPDATE_STEP = 0
                   AND V_EID_DOE = V_CASE_DOE
                   AND V_EID_POE = V_CASE_POE
                   AND V_EID_APPR_DATE = V_CASE_APPR_DATE
                   AND V_EID_APPR_DATE = V_CASE_DEPART_DATE;
                   UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 3
    WHERE V_SBI_UPDATE_STEP = 0
                   AND V_EID_DOE = V_CASE_DOE
                   AND V_EID_POE = V_CASE_POE
                   AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
    UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 4
    WHERE V_SBI_UPDATE_STEP = 0
                   AND V_EID_DOE = V_CASE_DOE
                   AND V_EID_POE = V_CASE_POE
                   AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
                   AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4 ;
         UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 5
    WHERE V_SBI_UPDATE_STEP = 0
                   AND V_EID_DOE = V_CASE_DOE
                   AND V_EID_POE <> V_CASE_POE
                   AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
    UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 6
    WHERE V_SBI_UPDATE_STEP = 0
                   AND V_EID_POE = V_CASE_POE
                   AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
    UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 7
    WHERE V_SBI_UPDATE_STEP = 0
         AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
              UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 8
    WHERE V_SBI_UPDATE_STEP = 0
    AND V_EID_DOE = V_CASE_DOE
                   AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
                   AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4;          
                   UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 9
    WHERE V_SBI_UPDATE_STEP = 0
    AND V_EID_DOE = V_CASE_DOE
                   AND V_EID_POE = V_CASE_POE;
              UPDATE SBI_DACS_CASE_RECORDS
              SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
                   SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 10
    WHERE V_SBI_UPDATE_STEP = 0
    AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
                   AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4;     
              END LOOP;
              CLOSE VALID_CIV_ID_FROM_EID;
         COMMIT;
         END;     
    -----Thats it. Thanks for your help.
    Ryan

    Please use [ code] or [ pre] tags to format code before posing:
    DECLARE
         V_EID_CIV_ID SBI_EID_W_VALID_ANUM_V.SUBJECT_KEY%TYPE;
         V_EID_DOE DATE;
         V_EID_POE SBI_EID_W_VALID_ANUM_V.POINT_OF_ENTRY%TYPE;
         V_EID_APPR_DATE DATE;
         V_CASE_CIV_ID SBI_DACS_CASE_RECORDS.CASE_EID_CIV_ID%TYPE;
         V_CASE_DOE DATE;
         V_CASE_POE SBI_DACS_CASE_RECORDS.CASE_CODE_ENTRY_PLACE%TYPE;
         V_CASE_APPR_DATE DATE;
         V_CASE_DEPART_DATE DATE;
         V_SBI_UPDATE_STEP SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP%TYPE;
         V_SBI_CIV_ID SBI_DACS_CASE_RECORDS.SBI_CIV_ID%TYPE;
         CURSOR VALID_CIV_ID_FROM_EID IS
              SELECT EID.SUBJECT_KEY,
               TO_DATE(EID.PROCESS_ENTRY_DATE),
               EID.POINT_OF_ENTRY,
               TO_DATE(EID.APPREHENSION_DATE),
               DACS.CASE_EID_CIV_ID,
               TO_DATE(DACS.CASE_DATE_OF_ENTRY,'YYYYMMDD'),
               DACS.CASE_CODE_ENTRY_PLACE,
               TO_DATE(DACS.CASE_DATE_APPR,'YYYYMMDD'),
               TO_DATE(DACS.CASE_DATE_DEPARTED,'YYYYMMDD'),
               DACS.SBI_UPDATE_STEP,
               DACS.SBI_CIV_ID
              FROM SBI_EID_W_VALID_ANUM_V EID,
               SBI_DACS_CASE_RECORDS DACS
              WHERE DACS.CASE_NBR_A = EID.ALIEN_FILE_NUMBER;
    BEGIN
         OPEN VALID_CIV_ID_FROM_EID;
         SAVEPOINT A;
    LOOP
         FETCH VALID_CIV_ID_FROM_EID INTO V_EID_CIV_ID, V_EID_DOE,
              V_EID_POE,V_EID_APPR_DATE,V_CASE_CIV_ID, V_CASE_DOE,
                   V_CASE_POE,V_CASE_APPR_DATE,V_CASE_DEPART_DATE,V_SBI_UPDATE_STEP,V_SBI_CIV_ID;
         DBMS_OUTPUT.PUT_LINE('BEFORE');
         EXIT WHEN VALID_CIV_ID_FROM_EID%FOUND;
         DBMS_OUTPUT.PUT_LINE('AFTER');
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_CASE_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 1
         WHERE V_CASE_CIV_ID IS NOT NULL
          AND V_CASE_CIV_ID <> 0;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 2
         WHERE V_SBI_CIV_ID IS NULL AND V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND V_EID_POE = V_CASE_POE
            AND V_EID_APPR_DATE = V_CASE_APPR_DATE
             AND V_EID_APPR_DATE = V_CASE_DEPART_DATE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 3
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND V_EID_POE = V_CASE_POE
            AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 4
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND V_EID_POE = V_CASE_POE
            AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
             AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4 ;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 5
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND V_EID_POE <> V_CASE_POE
            AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 6
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_POE = V_CASE_POE
           AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 7
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_APPR_DATE = V_CASE_APPR_DATE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 8
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
            AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 9
         WHERE V_SBI_UPDATE_STEP = 0
          AND V_EID_DOE = V_CASE_DOE
           AND V_EID_POE = V_CASE_POE;
         UPDATE SBI_DACS_CASE_RECORDS
          SET SBI_DACS_CASE_RECORDS.SBI_CIV_ID = V_EID_CIV_ID,
           SBI_DACS_CASE_RECORDS.SBI_UPDATE_STEP = 10
         WHERE V_SBI_UPDATE_STEP = 0
          AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) > -4
           AND (V_EID_APPR_DATE - V_CASE_APPR_DATE) < 4;
    END LOOP;
    CLOSE VALID_CIV_ID_FROM_EID;
    COMMIT;
    END;Peter D.

Maybe you are looking for