RAISE_APPLICATION_ERROR works only in exception block

Hi,
I am facing a strange issue. My RAISE_APPLICATION_ERROR wroks only in EXCEPTION block and not in BEGIN block. Please have a look at below description
I have a procedure that has IF Block as shown below.
BEGIN
IF TO_DATE('31-DEC-99', 'DD-MON-RR') > TO_DATE('11-MAR-12', 'DD-MON-RR') THEN
RAISE_APPLICATION_ERROR(-20001, 'some message');
END IF;
END;
-- RAISE_APPLICATION_ERROR is not working in the above code.
BEGIN
IF TO_DATE('31-DEC-99', 'DD-MON-RR') > TO_DATE('11-MAR-12', 'DD-MON-RR') THEN
RAISE EX_ABC
END IF;
EXCEPTION
WHEN EX_ABC THEN
RAISE_APPLICATION_ERROR(-20001, 'some message');
END;
--Here the exception is raised and it works fine.
BACKDROP:
I have made a trigger that does date validations. It calls procedure for all the validations. And the above shown code is a part of the validations that the procedure does.
Please help.
Edited by: Ishan on Mar 14, 2012 1:28 PM
Edited by: Ishan on Mar 14, 2012 1:31 PM

Ishan wrote:
I have myself checked and tested with all these conditions. Tried all to_date formats and dbms_output to be sure of the values but nothing seems to work.
It works in a sample code. But when implemented in the procedure it is ignoring the RAISE_APPLICATION_ERROR.
Condition is correct. Below is the logic because of which I can say it's correct
If 1=1 then
raise_application_error (-20001, 'ABC');
end;
this ignores the raise_application_error.
However if I modify the code with exception block, WITHOUT CHANGING THE CONDITION, iti works fine
if 1=1 then
raise ex_ab
exception
raise_application_error (-20001, 'ABC');
end;
Now the exception is raised.
NOTE: EVen if I am using 1=1 condition in my code, it is still ignoring the RAISE_APPLICATION error but it will raise the same in he exception block.
Not sure how is this possible.Are you saying the below code is giveing different result in your db?
BEGIN
IF 1=1 THEN
RAISE_APPLICATION_ERROR(-20001, 'some message');
END IF;
END;

Similar Messages

  • Material blocking working only in t-code Mb21 but we need from all ways i.e

    Hi,
    we have blocked Material 2611315121 for doing reservations. while doing
    reservations thorough t-code MB21 it is working fine(the system blocking
    to create reservation) . But while doing any maintenance order for same
    materail through t-code IW31 it was accepting i.e reservation creating
    for that Material.as well as while creating reservation through CJ20n
    also the s/m allowing to create Reservation with respect to that
    material.
    --Ganesh

    Hi Ganesh,
    System  just works differently to MM.
    It is check on good issue, than on the release.
    Goo to transaction OMS4, click on your Material Status (e.g 01) and
    verify if the field Plant Maintenance Message is updated.
    For example, if you don't want any procurement from PM you must insert E (ERROR)
    To show the blocking message, you have to add a 'B' in the field
    'PO/network item msg.' and in the field 'Plant maint. message' in
    transaction OMS4.
    Check also that in MM02> Purchasing tab : Plant-sp.matl status is set accordly.
    BR
    Nadia Orlandi

  • HTML not working in PL/SQL block..Help me ASAP

    declare
    l_col VARCHAR2(30) :=to_number(to_char(to_date('01-feb-2011','dd-mon-yyyy'),'dd'));
    CURSOR name_cur IS
      select name
          from   od_shift_schedule
          where   year=2011
          and    (month)=('Feb')
           and    decode(l_col,1,"01",2,"02",3,"03",4,"04",5,"05",6,"06",7,
                         "07",8,"08",9,"09",10,"10",11,"11",12,"12",13,"13",14,"14",15,"15",16,"16",17,"17",18,"18",19,"19",20,"20",
                         21,"21",22,"22",23,"23",24,"24",25,"25",26,"26",
                       27,"27",28,"28",29,"29",30,"30",31,"31")='W';
    BEGIN
      DELETE FROM nam;
      commit;
      FOR i IN name_cur
      LOOP
      dbms_output.put_line(i.name);
      htp.p('<b>Employee '||i.name||'  has been ticked.
       </b><br/>');
      EXECUTE IMMEDIATE 'insert into nam(name) values('''||i.name||''')';
      commit;
    END LOOP;
    end;Kindly help me with this
    If i'm wrong here kindly help me that how can i place a display message

    Re: HTML not working in PL/SQL block..Help me ASAP
    Using the community discussion forums for urgent issues is rude and a violation of the terms and conditions.
    http://www.oracle.com/html/terms.html
    >
    4. Use of Community Services
    Community Services are provided as a convenience to users and Oracle is not obligated to provide any technical support for, or participate in, Community Services. While Community Services may include information regarding Oracle products and services, including information from Oracle employees, they are not an official customer support channel for Oracle.
    You may use Community Services subject to the following: (a) Community Services may be used solely for your personal, informational, noncommercial purposes; (b) Content provided on or through Community Services may not be redistributed; and (c) personal data about other users may not be stored or collected except where expressly authorized by Oracle
    >
    Also please read the FAQ on how to ask questions.
    SQL and PL/SQL FAQ
    >
    2) Thread Subject line
    Give your thread a meaningful subject, not just "help please", "Query help" or "SQL". This is the SQL and PL/SQL forum. We know your question is going to be about those things, make it meaningful to the type of question so that people with the right sort of knowledge can pick it up and those without can ignore it. Never, EVER, mark your subject as "URGENT" or "ASAP"; this forum is manned by volunteers giving their own time to help and your question is never urgent or more important than their own work or than other people's questions. It may be urgent to you, but that's not forum members issue.

  • Informix 7.3 - Oracle 8i migration: Generate Exception Blocks not offered

    I have installed OMWB 2.0.2 and plugin for Infromix Dynamic Server 7.3.
    There is no offered checkbox "Generate Exception Blocks" in "Parse Options" panel for customization of parsing stored procedures in Source Model.
    (But it was normally offered and working in previous OMWB 1.4.1 wersion).
    How I could coerce OMWB2.0.2 to generate BEGIN-EXCEPTION-END blocks around every SELECT statement in stored procedures ?
    Many thanks
    Vladimir Kubanka (alias Bare Foot)
    [email protected] , [email protected]

    Vladimir,
    Generate Exception Blocks parse option is available on the T/SQL to PL/SQL parsers (Sybase and Microsoft SQLServer), I suppose you could put in an enhancement request if this functionality was important to yourself and other users.
    Turloch

  • Capturing error in Exceptions Block in a PLSQL Procedure

    Hi,
    I am creating a procedure where i need to update a table with some constraints.
    i need to update atleast a million records with data from another table.
    but here is the catch while updating million records, there may be some records which wont be vaild because of the constraints and cannot be updated and hence will give an error.
    but in my procedure i want to write an exception block where it captures the error, ignores the error and keep coninuing the procedure and update all the remaining records instaed of getting hanged at the point of erorr.
    How can i do this.
    I know i can disable the constraints in the table.
    but i want the constraints enabled, so that the errors are trapped and skipped and only the records that are valid are updated.
    Can seomone help me write this exception block which does this function.
    Thanks,
    Philip.

    Hi,
    I used the exception bloack as u said.
    i have a sample of 20 records and i know the 11th record is not valid and should be inserted in a different way from the rest 19 records.
    so i ran the same query with the exceptions block.
    but what happened, until 10th record everything was fine.
    on the 11th record the execution went into the exceptions block and executed whatever was there in the exception block, but then the script just exited after exception block, it did not go back to fetch the remaining records from 12th unitl 20th.
    How can i fix this.
    Philip.

  • Ref cursor in exception block

    Hi all.. I have a stored procedure that needs to return a records to Crystal Report.
    I'm using an outpur parameter of type cursor.
    In the proc, I am selecting the data from a table based on the input criteria and inserting into a GTT table,
    if so, retrieve and store in the table and generate and throw output to CR.
    if it is not returning any data i should raise exception and throw the related message to CR.
    But in my proc even though it wont insert data into table b going inot next statements where it should not go.
    create or replace procedure a(a1 varchar2,ref_cur out pkg1.cru)
    as
    cnt number;
    begin
    insert into b
    (select * from a where a.col=a1);
    commit;
    open ref_cur for
    select a.col from a;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20001, SQLERRM);
    WHEN NO_DATA_FOUND THEN
         open ref_cur for
    select 'No Data Found' col from dual;
    end;
    1.please suggest wherer to raise exception when "select * from a where a.col=a1" doesn't return any value.
    2. Can ref cursor be used in exception block.
    if i use condition like
    after the insert statement
    select count(*) into cnt from b;
    if cnt=0 then
    raise NO_DATA_FOUND;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20001, SQLERRM);
    WHEN NO_DATA_FOUND THEN
         open ref_cur for
    select 'No Data Found' col from dual;
    please suggest any other way to handle
    Thanks in advance

    First and foremost some fundamental things:
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20001, SQLERRM);
    WHEN NO_DATA_FOUND THEN
    open ref_cur for
    select 'No Data Found' col from dual;
    end;1. You can not declare WHEN OTHERS before any other EXCEPTION. You can not compile this. Here you have declared WHEN OTHERS first then NO_DATA_FOUND and it is erroneous.
    2. This is not the way you want to handle the WHEN OTHERS exception.
    WHEN OTHERS_
    http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html
    http://tkyte.blogspot.com/2007/03/dreaded-others-then-null-strikes-again.html
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/toc.htm

  • CRM_ORDER_MAINTAIN works only in debug mode

    Hi Experts,
    I am currently facing a strange issue. I am trying to add a line item to a service ticket, but the code works only in debug mode. Sample code is given below:
    lv_product_i-ref_handle = '0000000001'.
    lv_product_i-ref_guid = lv_header_guid.
    INSERT lv_product_i INTO TABLE lt_product_i.
    ls_orderadm_i-header = lv_header_guid.
    ls_orderadm_i-itm_type = 'ZSG5'.
    ls_orderadm_i-number_int = '0000000010'.
    ls_orderadm_i-ordered_prod = 'SERVICEITEM_SG5'.
    ls_orderadm_i-handle = '0000000001'.
    ls_orderadm_i-mode = 'A'.
    ls_orderadm_i-itm_proc_ident = 'SRVC'.
    INSERT ls_orderadm_i INTO TABLE lt_orderadm_i.
    ls_input_fields-ref_handle = '0000000001'.
    ls_input_fields-objectname = 'ORDERADM_I'.
    CLEAR ls_field_names.
    ls_field_names-fieldname = 'HANDLE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'HEADER'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_PROC_IDENT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_TYPE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'MODE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'NUMBER_INT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ORDERED_PROD'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
    it_product_i = lt_product_i
    CHANGING
    ct_orderadm_i = lt_orderadm_i
    ct_input_fields = lt_input_fields
    EXCEPTIONS
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    OTHERS = 5.
    LOOP AT lt_orderadm_i INTO lv_tempvar.
    lv_item_guid = lv_tempvar-guid.
    ENDLOOP.
    The item guid is coming as initial and no item is being added.But if i put a breakpoint in CRM_ORDER_MAINTIAN, then the guid is being generated properly. Any pointers why the code is behaving like this or someone has faced a similar issue before?
    Thanks and Regards,
    Rohit

    Hi Rohit,
    The above said is also correct + U have to write
      CALL FUNCTION 'CRM_ORDER_SAVE'
        EXPORTING
          IT_OBJECTS_TO_SAVE = GT_OBJ_GUIDS
        IMPORTING
          ET_SAVED_OBJECTS   = GT_SAVED_OBJECTS
        EXCEPTIONS
          OTHERS             = 2.
      COMMIT WORK.

  • CRM_ORDER_MAINTIAN works only in debug mode!

    Hi Experts,
    I am currently facing a strange issue. I am trying to add a line item to a service ticket, but the code works only in debug mode. Sample code is given below:
    lv_product_i-ref_handle = '0000000001'.
    lv_product_i-ref_guid = lv_header_guid.
    INSERT lv_product_i INTO TABLE lt_product_i.
    ls_orderadm_i-header = lv_header_guid.
    ls_orderadm_i-itm_type = 'ZSG5'.
    ls_orderadm_i-number_int = '0000000010'.
    ls_orderadm_i-ordered_prod = 'SERVICEITEM_SG5'.
    ls_orderadm_i-handle = '0000000001'.
    ls_orderadm_i-mode = 'A'.
    ls_orderadm_i-itm_proc_ident = 'SRVC'.
    INSERT ls_orderadm_i INTO TABLE lt_orderadm_i.
    ls_input_fields-ref_handle = '0000000001'.
    ls_input_fields-objectname = 'ORDERADM_I'.
    CLEAR ls_field_names.
    ls_field_names-fieldname = 'HANDLE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'HEADER'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_PROC_IDENT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ITM_TYPE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'MODE'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'NUMBER_INT'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    ls_field_names-fieldname = 'ORDERED_PROD'.
    APPEND ls_field_names TO ls_input_fields-field_names.
    INSERT ls_input_fields INTO TABLE lt_input_fields.
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
    EXPORTING
    it_product_i = lt_product_i
    CHANGING
    ct_orderadm_i = lt_orderadm_i
    ct_input_fields = lt_input_fields
    EXCEPTIONS
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    OTHERS = 5.
    LOOP AT lt_orderadm_i INTO lv_tempvar.
    lv_item_guid = lv_tempvar-guid.
    ENDLOOP.
    The item guid is coming as initial and no item is being added.But if i put a breakpoint in CRM_ORDER_MAINTIAN, then the guid is being generated properly. Any pointers why the code is behaving like this or someone has faced a similar issue before?
    Thanks and Regards,
    Rohit

    Well, during debugging an implicit COMMIT WORK is executed on a regular basis. This might cause the ITEM GUID to be created during debugging.
    However, normally, after CRM_ORDER_MAINTAIN, you should use the CRM_ORDER_SAVE as well. This will return a list of SAVED_OBJECTS. If all objects were saved correctly, do an explicit COMMIT WORK.
    Works fine for us.....

  • Video control works only with right click

    I published a podcast in my iweb website.
    One of the videos has been published, but the play button works only by right clicking, instead of normal left click...
    Other videos work well....
    I Just tried to delete, rebuild and publish again the page, but nothing changed...
    Does anybody know how to solve my issue?
    Thank you
    AZ

    Since you do not provide useful information so I can check it, I have to guess :
    Is an image or object blocking the video? Or is the video below the bodylayer and in the footer area?
    In a browser window, do Command-A to select everything on a page.
    In iWeb do Command-Shift-L to see the outline of the page and it's object.
    Study everything very carefully to see what's hiding.

  • ToolTip_Text not working in multi - record block - Please Help!!

    Dear Friends & Gurus,
    I'm using Forms Version 6.0.8.21.3 (due to many reasons) in C/S mode. Now I have a multi record block in which I am showing the Employee No. My customer's requirement is when I place the mouse on this Emp no., the emp. name must be displayed. I thought of achieving this by ToolTip_text. For this I'm having a Database function which returns the name (as I use this functionality in many forms), in the When-New-Item-Instance block level trigger I'm calling that function with passing the emp code as below
    SET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM, TOOLTIP_TEXT, FUNC_DIS_EMP_NAME(:SYSTEM.CURSOR_VALUE));But it is working only when I point the mouse in the first record. When I click on 3 or 4 record and then point to the first record, I'm getting the 3 record's name but in the first record.
    Please help me - I searched through the forum and I find no accurate answer. It is urgent - please help.
    Thank you.
    With Kind Regards,
    Perumal Senthil Alagu.

    Dear Safwan Bhai,
    As salaamo alaikum Rahamatulla hi burakathu!!
    Actually I'm having a multi record block in which all the emp no., days of attendance, etc will be displayed when I click on the search button. My requirement is when point the mouse over the emp no, the emp name must be displayed as a Tool tip text. My fields are non-editable, so Post-Change is not working. I placed the coding in the When-new-item-instance - in this case the emp name is displayed, but only for the first field, when I move the mouse to second and third fields, the empname of that particulart field is displayed as a tool tip but in the first field only.
    Any other suggestions?
    Anyway I would appreciate your help.
    Thank you.
    With Kind Regards,
    Perumal Senthil Alagu.

  • Isn't this Exception block redundant?

    DB Version: 10.2.0.4
    Found this on procedure code.
    begin
              select nvl(user_id,'NONE')into v_userid from user_info where user_id = p_userid;              
    exception
    when no_data_found then
    RAISE_APPLICATION_ERROR (-20002, 'No Such User');
    end;NO_DATA_FOUND occurs when SELECT query retuns NULL, not when the SELECT returns
    no rows selectedSince NVL is handling NULLs in the SELECT query, the above exception block is never going to be used. Right?

    user872043 wrote:
    DB Version: 10.2.0.4
    Found this on procedure code.
    begin
              select nvl(user_id,'NONE')into v_userid from user_info where user_id = p_userid;              
    exception
    when no_data_found then
    RAISE_APPLICATION_ERROR (-20002, 'No Such User');
    end;NO_DATA_FOUND occurs when SELECT query retuns NULL, not when the SELECT returns
    no rows selected
    No, it's just the opposite. NO_DATA_FOUND is raised when no rows are returned. It doesn't matter what's in that row: all NULLs is okay.
    Since NVL is handling NULLs in the SELECT query, the above exception block is never going to be used. Right?That's easy for you to test. Pass a value of p_userid that you know does not exist.
    The EXCEPTION block is redundant in the sense that Oracle will raise an error anyway. It would be NO_DATA_FOUND, not 'No Such User', but the line number in the error message would point to the SELECT statement, not the RAISE_APPLICATION_ERROR statement.

  • Exception block insert

    I am just wondering if it's except-able to put and insert in the exception block? What I would like is if date2 is null kick off an error. if there are no records where date2 is null then go ahead and insert the new record. Is this common practice or should I use sql%rowcount or put count in to variable and check if greater then 0?
    create or replace
    PROCEDURE X_INSERT
    (P_ID NUMBER,
    P_DATE1 DATE,
    P_DATE2 DATE
    AS
    a NUMBER;
    BEGIN
    select ID into a from X where ID = P_ID
    AND DATE_2 IS NULL ;
    if sql%found then
    raise_application_error(-20000, 'record exists');
    END IF;
    exception
    when no_data_found then
    insert into X values (P_ID,P_DATE1, P_DATE2);
    END X_INSERT;

    >
    I am just wondering if it's except-able to put and insert in the exception block?
    >
    No - I do not think that approach is acceptable and would not recommend it.
    You need any exception LOGGING (inserts) to be permanent even if the transaction is rolled back.
    One way to accomplish this is to write a LOG procedure (e.g. SP_LOG) that uses PRAGMA AUTONOMOUS_TRANSACTION so that the logging will occur even if the original transaction is rolled back. You can have overloaded versions of SP_LOG that take different sets of parameters.
    The code in the exception block would call the LOG procedure to do the logging and would pass it any information relevant to the exception and where it was caused. A sample generic EXCEPTION block might be
      EXCEPTION
       WHEN OTHERS THEN
       /* Build error string to help debug problem */
       v_error_text := ('Exception :'
                        || SQLERRM
                        || ' Parse error :'
                        || TO_CHAR (SQLCODE)
                        || ' at position '
                        || TO_CHAR (DBMS_SQL.LAST_ERROR_POSITION)
                        || ' SQL Text used :'
       /* Log this error in a table - for researching problems. */
       SP_LOG ( v_error_text );
      END main_sp;There would normally be other parameters to the log procedure to identify the stored procedure and package name where the exception was raised, the exception error stack and so on.
    The exception block might also need to re-raise the exception rather than make it disappear so that the caller is aware of the exception that occured.
    In your case there is no real exception. You just want to log information.
    So instead of raising an exception you would just modify your code to call the logging procedure.
    if sql%found then
       SP_LOG('Cannot INSERT record into myTable - record exists');
    END IF;

  • Exception block in a procedure

    I have this exception block in my procedure, it use to work nicely (write log in UNIX, but since we upgrade to 10G is not working anymore.
    I ask my DBA, he said that I do have the right previlages to this
    Directory /home/connman/student';
    v_out_path VARCHAR2 (40) := '/home/connman/student';
    What is wrong? I will appreciate any help on this..
    PROCEDURE studlife_tbl_ins_rep_room_ind (
    p_studlife_repeat_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    IS
    v_out_path VARCHAR2 (40) := '/home/connman/student';
    v_out_file VARCHAR2 (40)
    := 'cc_student_life_pkg'
    || '_'
    || TO_CHAR (SYSDATE, 'YYYYMMDDHH');
    v_file_handle UTL_FILE.file_type;
    v_pidm NUMBER;
    v_count NUMBER;
    e_insert_zero EXCEPTION;
    CODE (GO HERE)
    p_studlife_repeat_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    SELECT COUNT (repeat_pidm)
    INTO v_count
    FROM SZSLIFE_REPEAT_ROOM;
    --- WHERE szslife_rm_asg_term_code_eff = p_stulife_term_code;
    IF v_count = 0
    THEN
    RAISE e_insert_zero;
    ELSE
    UTL_FILE.put_line (v_file_handle,'Number of Records Inserted' || v_count);
    END IF;
    EXCEPTION
    WHEN e_insert_zero
    THEN
    ROLLBACK;
    p_studlife_repeat_err_code :=
    'CC_ERROR_MSG: Insert Procedure. ZERO Rows Returned in INSERT statement for term '
    || '.';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    UTL_FILE.put_line (v_file_handle,
    p_studlife_repeat_err_code
    || 'sqlerrm: '
    || p_ora_err_msg
    || ' / sqlcode: '
    || SQLCODE
    WHEN OTHERS
    THEN
    ROLLBACK;
    p_studlife_repeat_err_code :=
    'CC_ERROR_MSG: Error on INSERT statement for term '
    || p_studlife_repeat_err_code
    || '.';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END studlife_tbl_ins_rep_room_ind;

    I don't think my DBA knows what is going on, I did read and here is the entire precedure, as I said use to work in Oracle 9.2. since we upgrade to 10G it is
    not working, I am not getting an error, It is not wring anything to the directory
    '/home/connman/student'; my dba said that I have the right priveliges to that directory...
    PROCEDURE studlife_tbl_ins_rep_room_ind (
    p_studlife_repeat_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    IS
    v_out_path VARCHAR2 (40) := '/home/connman/student';
    v_out_file VARCHAR2 (40)
    := 'cc_student_life_pkg'
    || '_'
    || TO_CHAR (SYSDATE, 'YYYYMMDDHH');
    v_file_handle UTL_FILE.file_type;
    v_pidm NUMBER;
    v_count NUMBER;
    e_insert_zero EXCEPTION;
    BEGIN
    UTL_FILE.fclose_all;
    v_file_handle := UTL_FILE.fopen(v_out_path, v_out_file, 'a');
    UTL_FILE.put_line (v_file_handle,
    CHR (10) || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    UTL_FILE.put_line (v_file_handle, 'studlife_tbl_ins_rep_room_ind .');
    INSERT INTO SZSLIFE_REPEAT_ROOM
    repeat_pidm ,
    repeat_term_code ,
    repaat_bldg_code ,
    repeat_desc ,
    repeat_room_number ,
    repeat_indicator
    SELECT
    DISTINCT
    temp_pidm,
    temp_term_code,
    temp_bldg_code ,
    temp_desc ,
    temp_room_number ,
    DECODE (lag(temp_room_number)
    over (PARTITION BY temp_bldg_code, temp_room_number ORDER BY temp_term_code) , NULL,'N', temp_room_number,'Y',NULL)
    FROM
    SZSLIFE_TEMP_TBL
    ---WHERE temp_pidm = 1862
    ORDER BY
    temp_term_code;
    COMMIT;
    p_studlife_repeat_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    SELECT COUNT (repeat_pidm)
    INTO v_count
    FROM SZSLIFE_REPEAT_ROOM;
    --- WHERE szslife_rm_asg_term_code_eff = p_stulife_term_code;
    IF v_count = 0
    THEN
    RAISE e_insert_zero;
    ELSE
    UTL_FILE.put_line (v_file_handle,'Number of Records Inserted' || v_count);
    END IF;
    EXCEPTION
    WHEN e_insert_zero
    THEN
    ROLLBACK;
    p_studlife_repeat_err_code :=
    'CC_ERROR_MSG: Insert Procedure. ZERO Rows Returned in INSERT statement for term '
    || '.';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    UTL_FILE.put_line (v_file_handle,
    p_studlife_repeat_err_code
    || 'sqlerrm: '
    || p_ora_err_msg
    || ' / sqlcode: '
    || SQLCODE
    WHEN OTHERS
    THEN
    ROLLBACK;
    p_studlife_repeat_err_code :=
    'CC_ERROR_MSG: Error on INSERT statement for term '
    || p_studlife_repeat_err_code
    || '.';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END studlife_tbl_ins_rep_room_ind;

  • All CS2 apps crash with "Read Only Memory Exception" error.

    Machine Specs.
    Apple G5 1.8ghz DP
    OS X 10.4.10
    It doesn't matter which one I open, they all crash with the same error. This started when a user placed a support ticket for their mac not starting up. I wasn't able to save the user so I created a new user, and then moved their desktop files over to the new user. However the only files I moved were those on the desktop, and their Notes data directory.
    Thinking my job done I marked the tickets closed and walked away.
    I got a call later when the user came into the office and the issue was that Indesign CS2 was crashing with a "Read Only Memory Exception" error. I first deleted the Preferences on the machine. That didn't work.
    So I created a new user to see if it was the user causing the errors. I received the same error when opening Indesign CS2 from the brand new user account. I also tested all other CS2 programs and got the same errors.
    Next I tried deleting the CS2 programs and re-installing them. No luck, same error, even with a new user. I have not re-installed any plug-ins with the new App installs yet.
    Removed all fonts, and ran a font cache cleaner. Same error.
    Finally, the last thing I've tried is to manually remove every adobe application on the machine. Acrobat 5/6/7, CS1, CS2...etc. I have also removed any Adobe files/folders in the //library/, and /$home/Library/.
    Yet I still get the same error. Short of a complete wipe I'm not sure where to proceed next. I'm really confused and hoping someone can give me some clues.

    Thanks to a comcast permissions error any new files I upload to my comcast.net pages requires the administrator username/password to even see the file to download it. Simply giving out the URL for new files results in page not found errors.
    So for the forseeable future I don't see any way to upload this file correctly. Its there on my webspace all 63megs of it. If I login through the FTP account I can upload and download to my hearts content but since anonymous access is disabled I'm not giving out my administrator login info.
    I've got a gig of space, using 22mb of it, and can't upload any more files because no-one has permissions to access them.
    I spent a half hour on the phone with comcast trying to figure this out. However I don't know whats going on with their end. I have a trouble ticket open for a level 3 tech, we'll see whats going on.
    So the Font Scrubber will remain unavailable for the time being unless someone wants to give me guest upload access to a FTP account. I'm not opening a fileshare account with anyone, don't like'm.

  • How to make the same code that works only?

    how to make the same code that works only?
    code:
    Form2.Close = Me.Enabled = true
    effect such as this code

    I have this code:
    Public Class Form1
    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    Form2.Show()
    Me.Enabled = False
    End Sub
    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
    Form3.Show()
    Me.Enabled = False
    End Sub
    End Class
    he wants to after closing Form2 and Form3 unblocked the whole form1
    it means that:
    when I click the button, displays the himself form2 and blocks himself form1" and after closing Form2 , unlocks himself Form1"
    the same with Form3

Maybe you are looking for

  • Could not complete your request because of a program error~CS4

    What is happening: I open photoshop, I then try to create a canvas or load a file dosnt matter what I try to do as long as im trying to do a new project, I click ok in both of them then I get the error, when I click OK I get photoshop CS4 has stopped

  • I have a WRT54G Wireless modem with firmware version 1.02...

    I have a WRT54G Wireless modem with firmware version 1.02.1 Mar 4 2003. i down loaded the latest firmware for the modem but i can't install it. I get the erroe message"incorrect image file". What is wrong?

  • Util_file.fgetattr    'file does not exist'

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production PL/SQL Release 11.1.0.7.0 - Production CORE 11.1.0.7.0 Production TNS for 32-bit Windows: Version 11.1.0.7.0 - Production NLSRTL Version 11.1.0.7.0 - Production The file exists an

  • Package Procedure

    Problem calling a package procedure with default values within oracle forms 6i. It appears that oralce forms 6i does not support calls to package procedure with default values. Any ideas why??? Much appreciated.

  • Print via Airprint with iPad 3 and Canon MG5350

    Hi, I have a very common problem but none of the so far provided answers were suitable to help me. I use a new Canon MG5350 printer with WLAN and Airprint. The firmware has been updated to version 2 and nevertheless I cannot print via Airprint from m