Ask about UTL_FILE in Stored Procedure

Hi
I was trying to do an insert in a table which then trigger a stored procedure to write the inserted data to a text file. However, I have some issues here in the Stored Procedure. Thanks for trying to help... [Insert -> Table -> Trigger -> Stored Procedure -> Text File]
----User will execute this sql
----insert into tester.test_table values ('ab');
CREATE TABLE TESTER.TEST_TABLE
  LINECODE  VARCHAR2(2 BYTE)
----Just for testing purpose
CREATE TABLE TESTER.TEST_REC_TABLE
  LINECODE  VARCHAR2(2 BYTE)
CREATE OR REPLACE TRIGGER TESTER.TRIGGER_AUDIT
AFTER INSERT OR UPDATE
ON TESTER.TEST_TABLE REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
DECLARE
  sLineCode VARCHAR2(2);
BEGIN
   sLineCode := '';
    IF UPDATING THEN     
      sLineCode := :NEW.LINECODE;
      TRIGGER_PACKAGE.WRITE_FILE(sLineCode);
    END IF;  
    IF INSERTING THEN
      sLineCode := :NEW.LineCode;
      TRIGGER_PACKAGE.WRITE_FILE(sLineCode);
    END IF;
EXCEPTION
    WHEN others then null;
END TRIGGER_AUDIT;
CREATE OR REPLACE PACKAGE BODY TESTER.TRIGGER_PACKAGE
is
   procedure WRITE_FILE(in_LineCode in varchar2)
   is
     sLineCode varchar2(2);  
     v_FileHandle UTL_FILE.FILE_TYPE;
----some checking of the input data for NULL 
   begin  
    if ((rtrim(in_LineCode) IS NULL) or (in_LineCode is null)) then
        sLineCode := 'XX';
    else
        sLineCode := in_LineCode;          -------->PROBLEM HERE?
    end if;
    if (length(sLineCode) > 2) then
      sLineCode := substr(sLineCode,1,2);
    end if;
    Insert into TEST_REC_TABLE (LineCode) values (sLineCode); ----insert data to another table for testing
    EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY FILEDIR AS ' || '''' || 'c:\' || '''';
    v_FileHandle := UTL_FILE.FOPEN('FILEDIR','Test_Table.txt','w'); ----write to text file in C:\Test_Table.txt
    UTL_FILE.PUT_LINE(v_FileHandle, 'Inserted ' || sLineCode || ' @ ' || TO_CHAR(SYSDATE,'DD-MM-YYYY HH:MI:SS AM'));
    UTL_FILE.FCLOSE(v_FileHandle);           
   exception
      when others then null;
   end;
end TRIGGER_PACKAGE;
1) The problem I faced is that when I perform INSERT sql for the new data, it can be successfully be inserted into both tables TEST_REC_TABLE and TEST_TABLE, but it just does not write to the text file.
2) However, when I just execute the procedure I will get XX for the input data as it is NULL. This XX data will then be seen in TEST_REC_TABLE as "XX" record and Test_Table.txt as "Inserted XX @ 10-01-2014 04:56:06 PM". UTL_FILE did write to textfile so my guess is that it could be due to my poor understanding of logic in the checking of the input data for NULL. Tried but I am still clueless, thanks for pointing out the issue.

> 1) I'm just testing and learning here with trigger insert...
Good. In that case its just a wrong choice that you have decided to write to a file from trigger. Oracle base is a good site. They have examples too. Please check that ORACLE-BASE - Database Triggers Overview.
> 2) How should I do then?
Just create the object one time
CREATE OR REPLACE DIRECTORY FILEDIR AS <path>
The path should be a location in your server where oracle is installed.
> 3) How should I do then? Use this ?
EXCEPTION
      WHEN OTHERS THEN
           DBMS_OUTPUT.PUT_LINE
                ('ERROR ' || TO_CHAR(SQLCODE) || SQLERRM);
           NULL;
Don't do any thing. Just remove the exception handling. Don't handle unknown exceptions. If at all you want to handle them for logging purpose RAISE it at the end like this.
exception
  when others then
    <log your messages>
    raise;
And about exception handling one of the forum member BluShadow has written a nice article PL/SQL 101 : Exception Handling. That would be a nice read.

Similar Messages

  • A Question about Delphi Call stored procedure??

    Hi! I use Delphi to develop a 3-tied application.and i write a stored procedure to insert data.If I use BDE to derectly to invoke this stored procedure ,it can insert data in proper. But in 3-tied Application, when I invoke the stored procedure though application server(middle-tied),Application Raise Error."ORA-06502:PL/SQL:numeric or value error:Character string buffer too small ora-06512:at "sfis1.insert_cpk_record" line 92,ora-06502:PL/SQL: numeric or value error:Character string buffer too small ora-06512 at line 1" .Please help me.It's urgent.

    It's impossible to say without seeing the source of the procedure, but on line 92, there is an assignment made to a string variable that is sized too small for the value.
    Something like:
    is
      v_variable varchar2(2);
    begin
      v_variable := 'ABC';
    end;Is it possible that the middle tier is passing in a parameter value that is longer than you expect? We could comment further if you can post the PL/SQL code.
    You might also throw in some debugging code to compare the parameter values between the BDE and middle tier calls.

  • Howto get information about Java Stored Procedures programmaticly

    Hi all,
    using the DatabaseMetaData object it is easily possible to get information about database objects like tables, columns or even plsql stored procedures.
    But is there a way to get information about Java Stored Procedures which are published in packages ? Is it possible here to use a DatabaseMetaData object or is there any other solution ?
    TIA,
    Chris

    What sort of information do you want to know about the Java stored procedures?
    Would the views USER_SOURCE or USER_OBJECTS contain the information you need?

  • ISeries Stored Procedure - How To

    Good morning,
    (I searched for iSeries (formerly called AS/400) stored procedures, but didn't get any hits. I'm thinking that calling an iSeries stored procedure will be a bit different from what's described in the threads I found, hence this thread. :-)
    Our Apex environment connects to our iSeries but with Read Only rights. We retrieve a lot of iSeries data and do so via DB Links and SQL. We now have an Apex app that needs to create purchase orders in our iSeries PO system. Since we don't have update rights and won't be given update rights we are being asked to call a stored procedure on the iSeries to do this. That's cool, but I don't know how to go about doing so. :-)
    Can anyone help get me started? If you've done this and have all the details that would be great. Or, if you just know from a high level how to go about it that would be helpful too. I can work out the details. In other words, any help is appreciated.
    Thanks, Tony

    Hi Mojib,
    Please create a sample stored procedure like this which contains select statement and in communication channel give
    wite stored procedure name only to sql query statment and in update statement write <test>.
    I am executing this stored procedure successfully.
    Create Proc GetResultX As
    Begin
    Select * From TESTX
    End
    Execute statement for stored procedure is :
    Exec GetResultX
    Regards
    Laxmi Bhushan Jha
    Rewards point if found usful
    I have given same answer to one of the same  thread

  • How do I get the returned cursor from a stored procedure to an asp.

    Sorry if this topic has been answered before but I am new to Oracle and ASP. I have been asked to create some stored procedures and access the results from the ASP. I will be passing one variable in and could be getting upto 200 rows returned.
    I have no trouble with the stored procedure but have no clue how to retrieve the data returned by it.

    Assuming that the stored procedure has a single argument, an OUT cursor, you should be able to do
    SQLExecDirect
    {call <stored_proc>() }
    SQLFetch
    SQLGetData
    We'll handle all the 'magic' underneath.
    Justin Cave
    ODBC Development

  • Passing Tables back from Java Stored Procedures

    Thomas Kyte has written (in reference to
    trying to pass an array back from a stored
    function call):
    You can do one of two things (and both require the use of
    objects). You cannot use PLSQL table types as JDBC cannot bind to
    this type -- we must use OBJECT Types.
    [snip]
    Another way is to use a result set and "select * from
    plsql_function". It could look like this:
    ops$tkyte@8i> create or replace type myTableType as table of
    varchar2 (64);
    2 /
    Type created.
    ops$tkyte@8i>
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace
    2 function demo_proc2( p_rows_to_make_up in number )
    3 return myTableType
    4 as
    5 l_data myTableType := myTableType();
    6 begin
    7 for i in 1 .. p_rows_to_make_up
    8 loop
    9 l_data.extend;
    10 l_data(i) := 'Made up row ' &#0124; &#0124; i;
    11 end loop;
    12 return l_data;
    13 end;
    14 /
    Function created.
    ops$tkyte@8i>
    ops$tkyte@8i> select *
    2 from the ( select cast( demo_proc2(5) as mytableType )
    3 from dual );
    COLUMN_VALUE
    Made up row 1
    Made up row 2
    Made up row 3
    Made up row 4 [Image]
    Made up row 5
    So, your JDBC program would just run the query to get the data.
    If the function "demo_proc2" cannot be called from SQL for
    whatever reason (eg: it calls an impure function in another piece
    of code or it itself tries to modify the database via an insert
    or whatever), you'll just make a package like:
    ops$tkyte@8i> create or replace package my_pkg
    2 as
    3
    4 procedure Make_up_the_data( p_rows_to_make_up in
    number ); 5 function Get_The_Data return myTableType;
    6 end;
    7 /
    Package created.
    ops$tkyte@8i>
    ops$tkyte@8i> create or replace package body my_pkg
    2 as
    3
    4 g_data myTableType;
    5
    6 procedure Make_up_the_data( p_rows_to_make_up in number )
    7 as
    8 begin
    9 g_data := myTableType();
    10 for i in 1 .. p_rows_to_make_up
    11 loop
    12 g_data.extend;
    13 g_data(i) := 'Made up row ' &#0124; &#0124; i;
    14 end loop;
    15 end;
    16
    17
    18 function get_the_data return myTableType
    19 is
    20 begin
    21 return g_data;
    22 end;
    23
    24 end;
    25 /
    Package body created.
    ops$tkyte@8i>
    ops$tkyte@8i> exec my_pkg.make_up_the_data( 3 );
    PL/SQL procedure successfully completed.
    ops$tkyte@8i>
    ops$tkyte@8i> select *
    2 from the ( select cast( my_pkg.get_the_data as mytableType
    ) 3 from dual );
    COLUMN_VALUE
    Made up row 1
    Made up row 2
    Made up row 3
    And you'll call the procedure followed by a query to get the
    data...
    I have tried this, and it works perfectly.
    My question, is what does the wrapper look
    like if the stored function is written
    in java instead of PL/SQL? My experiments
    with putting the function in java have been
    dismal failures. (I supposed I should also
    ask how the java stored procedure might
    look also, as I suppose that could be where
    I have been having a problem)
    null

    Thanks for the response Avi, but I think I need to clarify my question. The articles referenced in your link tended to describe using PL/SQL ref cursors in Java stored procedures and also the desire to pass ref cursors from Java to PL/SQL programs. Unfortunately, what I am looking to do is the opposite.
    We currently have several Java stored procedures that are accessed via select statements that have become a performance bottleneck in our system. Originally the business requirements were such that only a small number of rows were ever selected and passed into the Java stored procedures. Well, business requirements have changed and now thousands and potentially tens of thousands of rows can be passed in. We benchmarked Java stored procedures vs. PL/SQL stored procedures being accessed via a select statement and PL/SQL had far better performance and scaleable. So, our thought is by decouple the persistence logic into PL/SQL and keeping the business logic in Java stored procedures we can increase performance without having to do a major rewrite of the existing code. This leads to the current problem.
    What we currently do is select into a Java stored procedure which has many database access calls. What we would like to do is select against a PL/SQL stored procedure to aggregate the data and then pass that data via a ref cursor (or whatever structure is acceptable) to a Java stored procedure. This would save us a significant amount of work since the current Java stored procedures would simple need to be changed to not make database calls since the data would be handed to them.
    Is there a way to send a ref cursor from PL/SQL as an input parameter to a Java stored procedure? My call would potentially look like this:
    SELECT java_stored_proc(pl/sql_stored_proc(col_id))
    FROM table_of_5000_rows;
    Sorry for the lengthy post.

  • Can UDConnect call stored procedures?

    When I create a datasource for UDConnect, I can choose to pull data from the source system's table or view into my BW system. Is there a way for me to choose/call the source system's stored procedures instead of just tables and views? Thanks.

    Hi,Chris
    "Stored PL/SQL procedures can be called from data Templates and Oracle Reports."Really?It is a great news for me.
    Currently I am working on a poc.
    There is a problem about calling Oracle stored procedures directly thru BI EE or BI Publisher.
    Our customer has a lot of stored procedures in their previous system,they strongly hope our BI EE can call these sp directly.
    All of these sp return the result set to the cursor,then the applications operate the cursor.
    As there is no way can BI EE working with Oracle stored procedures or cursor,I am wondering whether can I call the sp from BI Publisher.
    Can BI Publisher call sp or pl/sql?Can data template using pl/sql not only pure sql statements?
    I have try write some pl/sql in data template,but it failed.It seems that the data template can only operate on some returned result sets.But sp won't.
    If sp can be called thru data template,everything will be ok for me.For I can use pl/sql to opereate the returned cursor.

  • Can BI Publisher call stored procedures?

    Can BI Publisher call stored procedures,no matter how?

    Hi,Chris
    "Stored PL/SQL procedures can be called from data Templates and Oracle Reports."Really?It is a great news for me.
    Currently I am working on a poc.
    There is a problem about calling Oracle stored procedures directly thru BI EE or BI Publisher.
    Our customer has a lot of stored procedures in their previous system,they strongly hope our BI EE can call these sp directly.
    All of these sp return the result set to the cursor,then the applications operate the cursor.
    As there is no way can BI EE working with Oracle stored procedures or cursor,I am wondering whether can I call the sp from BI Publisher.
    Can BI Publisher call sp or pl/sql?Can data template using pl/sql not only pure sql statements?
    I have try write some pl/sql in data template,but it failed.It seems that the data template can only operate on some returned result sets.But sp won't.
    If sp can be called thru data template,everything will be ok for me.For I can use pl/sql to opereate the returned cursor.

  • How to call stored procedure from javascript? (about Google Suggest, AJAX)

    Hi I want to implement a text field so that it behaves like [Google Suggest|http://www.google.com/webhp?complete=1&hl=en] .
    I read this post .
    Now I've setup everything according to that document. But it just doesn't work. And I don't know why.
    I think problems may fall into the following three categories:
    1. Does the text field and the page invoke the proper javascript?
    2. Does the javascript successfully call the stored procedure?
    3. Can the stored procedure correctly return the formatted result?
    I am affirmative for 1 and 3, but I'm not sure about 2. Because I don't know how to tell if a stored procedure has been called? Is there a PL/SQL statement that I can query in SQL*Plus?
    Also, I would to know how to debug AJAX in APEX. It involves many things.
    Last, I used APEX 3.2 and Oracle XE. I cannot find either dads.conf or marvel.conf file. Is "/apex/" the virtual directory for APEX?
    Thanks a lot!

    Hello,
    I recently also ran into problems with this and I will post my solution here:
    1) if you need to pass parameters to your procedure, create it using "Flexible Parameter Passing". Then parse the parameters out of the array and put them in local variables inside your PL/SQL procedure.
    Example:
    CREATE OR REPLACE PROCEDURE MATTHIASH.incsearch(name_array IN owa.vc_arr,
         value_array IN owa.vc_arr) as
      l_List1 varchar2(4000);
      l_List2 varchar2(4000);
      l_query varchar2(255);
      l_separator varchar2(10) default '';
      qu varchar2(4000) default '';
      hl varchar2(4000) default '';
    BEGIN
      FOR i IN 1 .. name_array.COUNT 
      LOOP
           IF name_array(i) = 'qu' THEN
                qu := value_array(i);
           ELSIF name_array(i) = 'hl' THEN
                hl := value_array(i);
           END IF;
      END LOOP;
      l_query := qu||'%';
      FOR x IN (
      select object_name, object_id from user_objects
      where upper(object_name) like upper(l_query) and upper(object_type) = upper(hl) order by 1 asc)
      LOOP
        l_list1 := l_List1 || l_separator || '"' || x.object_name || '"';
        l_list2 := l_List2 || l_separator || '"' || x.object_id || '"';
        l_separator := ',';
      END LOOP;
      owa_util.mime_header('text/html', false);
      owa_util.http_header_close;
      --htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
      htp.p('sendRPCDone(frameElement, "' || qu || '", new Array(' || l_List1 || '), new Array(' || l_List2 || '), new Array(""));');
    END;
    /2) grant EXECUTE rights to APEX_PUBLIC_USER (the user APEX uses to connect to the database) on the procedure
    grant execute on incsearch to apex_public_user;3) upload the ac.js file as static file to your application
    4) put the following javascript code in the HTML Header of your APEX page:
    <script src="#WORKSPACE_IMAGES#ac.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript">
    function iac()
    InstallAC(document.wwv_flow,document.getElementById('P1_X'),"","!MATTHIASH.incsearch","&P1_OBJECT_TYPE.");
    </script>In my example, P1_X is a text field and P1_OBJECT_TYPE is a dropdown list with all user object types.
    Good luck,
    Matthias Hoys

  • UTL_FILE in a trigger or calling a stored procedure within a trigger

    Hello,
    We are using Oracle 8i version where I need to either call a SP within a trigger or use UTL_FILE within a trigger.
    1. SP runs fine by itself to write to a file but when I try calling SP within a trigger-> I get INVALID Path - is there some kind of restriction with DB triggers and UTL_FILE options
    create or replace trigger testtrig
    after insert on test_table
    for each row when (new.stat_code = '99')
    BEGIN
    utl_file_test_write;
    EXCEPTION
    WHEN others THEN
    raise_application_error(-20000, sqlerrm);
    END;
    2. use UTL_FILE with a trigger
    create or replace trigger testtrig
    after insert on test_table
    for each row when (new.stat_code <> '99')
    DECLARE
    v_line varchar2(32767);
    v_location varchar2(80) :='/u01/oraadmin/udump';
    v_filename varchar2(80) := 'KC11.txt';
    v_handle utl_file.file_type;
    BEGIN
    dbms_output.put_line('Location is'||v_location);
    dbms_output.put_line('Location is'||v_filename);
    v_filename := :new.emp_id;
    v_handle := utl_file.fopen(v_location, v_filename,'W',32767);
    v_line := :new.emp_id;
    utl_file.put_line(v_handle,v_line);
    utl_file.fclose(v_handle);
    EXCEPTION
    WHEN TOO_MANY_ROWS THEN
    dbms_output.PUT_LINE('Too Many Rows');
    WHEN NO_DATA_FOUND THEN
    dbms_output.PUT_LINE('No Data Found');
    --WHEN utl_file.invalid_path THEN
    -- RAISE_APPLICATION_ERROR(-20000, 'utl_file.invalid_path');
    WHEN utl_file.invalid_mode THEN
    RAISE_APPLICATION_ERROR(-20000, 'utl_file.invalid_mode');
    WHEN utl_file.invalid_filehandle THEN
    RAISE_APPLICATION_ERROR(-20000, 'utl_file.invalid_filehandle');
    WHEN utl_file.invalid_operation THEN
    RAISE_APPLICATION_ERROR(-20000, 'utl_file.invalid_operation');
    WHEN utl_file.read_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.read_error');
    WHEN utl_file.write_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.write_error');
    WHEN utl_file.internal_error THEN
    RAISE_APPLICATION_ERROR(-20001, 'utl_file.internal_error');
    End;
    I still get INVALID_PATH. What am I missing?
    Any help is greatly appreciated.
    Thanks.

    Hi,
    from docs on UTL_FIL.FOPEN:
    location:
    Directory location of file. This string is a directory object name and is case sensitive. The default is uppercase. Read privileges must be granted on this directory object for the UTL_FILE user to run FOPEN.This, '/u01/oraadmin/udump' does not look like the name of a DIRECTORY object.
    Besides, the whole idea of having UTL_FILE commands directly in a trigger body sucks. At the least stay with a stored procedure.
    And have you considered what should happen with that file in case the transaction is rolled back?
    Regards
    Peter

  • About BC4j and java stored procedure

    Is it possible create a java stored procedure using BC4j and deploy to Oracle9iR2 VM?
    If it is possible, how about the performance compare to PL/SQL stored procedure?

    In 9.0.3.3 it will be possible again. The ability to deploy a BC4J-based, local-mode Java Stored Procedure was broken in 9.0.3 before this upcoming maintenance release.
    PL/SQL will almost surely be faster if you are talking about just doing basic DML type of operations, when compared to Java stored procedures.

  • Documentation about Stored Procedure in SBO

    Hi experts,
    I need some documentation about the how to use of Stored Procedured in SBO, what is valid and what is not valid for SAP. I want to know If only Execute SP from SBO, but no INSERT, DELETE or UPDATE in any SBO database table is valid for Support SAP??
    Thanks.

    Hi,
    You can refer to Note No. [ 896891|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=896891] regarding the Support Scope.
    You can check the link mentioned in the following thread
    Re: Tracking Opportunity
    Regards,
    Jitin
    SAP Business One Forum Team

  • Question about one stored procedure and a few entity objects

    There are few EOs in the project. At the same time there is a single stored procedure that has to be used for data modification.
    This procedure updates db tables that are mapped to these EOs. How do I implement doDML operation in this case?
    I have to call stored procedure from a single main EO, and disable data modification in the rest of EOs. Is it possible?
    If so, how do I pass parameters from other EOs, because in a doDML method i have a scope of this particular EO attributes, and do not have acces to the attributes of other EOs?
    Thanks!

    I am not sure with imovie since I use only Final Cut Pro. iDVD setting will let you expand the file for length. Naturaly the best quality pr performance will take less time of a file. In the case with iDVD 4 the best quality will only take 60 minutes of video already compressed. Best performance will take up to about 1 hour nd 49 minutes. You have to leave enough room for the menu to take up some space on the disc as well. In FCP we have to export as a quicktime file where with a 1 hour 30 min video can take about 20 minutes to export. the burning and compression time depends on the system you have. G5 faster, G4 like mine takes longer. on that same video idvd 4 will take about 3 hours to convert and burn the disc. When I use DVD Pro Studio that is way different and take a lot longer. I have had a typical 2 hour video take up to 14 hours to convert/export to a MPEG 2 format or DVD format. But the burning process take about an hour. It all depends on your equipment.
    Hope that helps.

  • Question about MySQL, JDBC, SQLJ, Stored procedure & callable statements

    Hi, there. I'm using j2sdk1.4.1_01 and MySQL ver 12.18 Distrib 4.0.12, and when I try to install a store procedure, it throws the following message:
    SQLException: Stored procedures not supported: {call sqlj.install_jar('blah...blah...MyProject-20031206.jar', 'routines_jar', 0)}
    Who's is not supporting store procedures here? Java or MySQL? What can I do?
    The book and sample code I'm using as a reference mention that "the sample code assumes that the DBMS already stores the built-in SQLJ procedure sqlj.install_jar, which loads a set of classes written in the Java programming language in an SQL system". Now my question is: the "SQLJ procedure sqlj.install_jar" is something extra that I need to install or it has nothing to do with the problem?
    Is it true that MySQL does not support stored procedures? Thank you in advance for any hint or suggestion.
    Regards,
    Hector.

    Who's is not supporting store procedures here? Java or
    MySQL?MySQL.
    What can I do?1. Don't use stored procedures.
    2. Use a database that supports stored procedures.
    3. Wait for the release of MySQL that does support stored procedures.

  • About stored procedures

    whenever i write a stored procedure in Oracle8.0.5 i get procedure created with compilation erros..what does this mean? any logs where i can see what errors exatly have occured? how to check if the procedure has been created at all or not....
    my procedure looks like ...
    CREATE OR REPLACE PROCEDURE DEL_LOGIN_ID (uid IN Varchar2(20)) IS
    BEGIN
         delete lst_pg where login_id :=uid;
         delete user_track where login_id :=uid;
         delete hrspent where login_id := uid;
         delete bookmark where login_id := uid;
         delete user_task where login_id := uid;
         delete user_sugg where login_id := uid;
         delete userinfo where login_id := uid;
    END;
    and i call it using
    call del_login_id(666)

    hi Gunjan
    if you look at your code
    CREATE OR REPLACE PROCEDURE DEL_LOGIN_ID (uid IN Varchar2(20)) IS
    BEGIN
    delete lst_pg where login_id :=uid;
    delete user_track where login_id :=uid;
    delete hrspent where login_id := uid;
    delete bookmark where login_id := uid;
    delete user_task where login_id := uid;
    delete user_sugg where login_id := uid;
    delete userinfo where login_id := uid;
    END;
    you are specifying the command wrongly.
    " login_id := uid "
    you should give as
    login_id = uid
    the former statement is called assignment . you should not do
    that operation at that place.
    correct your statements and then recompile your procedure.
    your procedure is very fine excepting that " := " operator.
    replace them with " = " . thats all.
    Secondly
    Delete statement is specifically meant for deletion of records
    from table only. Since Table is the only unit of data storage
    in oracle . even though you can execute delete command against
    a view but inturn it is executed on the base table only.
    You can use any of the delete statements
    DELETE table1;
    or
    DELETE FROM table1;
    both will work .
    Try that
    all the best
    [email protected]

Maybe you are looking for

  • Why is the Application Tab so different from the rest of iTune?

    It feels like the Applications tab is not from Apple. Is it done by a outsourcing company in China? There is no consistency between this tab with the rest of iTune. Is there a design theme across all parts of iTune? Why there is no list view for the

  • [Solved] Old Thinkpad Laptop with HPA LCD + SM712

    I have some problem configuring X on an old laptop (IBM Thinkpad 1161-237 i series 1200 with an HPA LCD 12.1" 800x600 max resolution) ... I tried everything. I can start X, but I have a mess on the screen ... you can see the windows, but there are li

  • DOM XML parser program

    Hi, I am trying to write a sample program using DOM xml parser in java to read the values in a XML file. please suggest me what are all the things I have to do for that. I know Java and XML. I want to know how to access values from XML file in java.

  • HT204053 iTunes Library question

    Organizing my iTunes Library I somehow deleted my 1500+ songs, it's empty! They're still on my iPhone though. So my question is: How do I transfer my music FROM my iPhone TO my MacBook Pro so I can restore my Library the way it was? Only 10% of these

  • Will Solaris 8 support Promise ATA100?

    Does Sun have any plans to support the Promise ATA100 controller on Solaris 8?