Oracle plsql stored procedure

I want to write a procedure in which IN parameter will be a query [e.g. select * from employee] & I want to store the result of the query into OUT parameter...
what will be the datatype for the OUT parameter & how to write the procedure??

user10412263 wrote:
this question was asked in interview of plsql...Idiotic question. An interviewer should determine if you know how to correctly use the tools in SQL and PL/SQL.. and not whether you know how to use it incorrectly. Even better - an interviewer should determine how you approach problems and how you will solve them using SQL and PL/SQL.
Questions that need to answers directly from the manual? That is pretty useless as it is easy to use manuals as reference material and no-one memorises the entire manual. Simple example. A question about the syntax for a partition exchange (ALTER TABLE) is silly.. whereas a question about where, when and why you would use a partition exchange is critical. The former you can look up in the manual at anytime when coding partition exchanges. The latter is a skill that requires understanding Oracle concepts and correctly applying these.
Remember this when you go for interviews. I realise one cannot always wait and choose the perfect job - but be careful landing in a job position where you will not grow your skills and knowledge because of an environment that values "+syntax knowledge+" higher than understanding and applying software engineering fundamentals and concepts.

Similar Messages

  • How to generate XML Publisher report from PLSQL Stored Procedure in APPS

    Hi,
    I have concurrent program of type PLSQL Stored procedure.I need to generate XML Publisher report from the same.I have changed the output of the concurrent program as "XML" but when I tried running it,the XML tags are not generated.Due to this I am unable to create the template.Its a urgent issue.
    Please help me out .
    Thanks in advance.
    Kaveri

    Hi Kaveri
    Sadly there is nothing magic about that output field. The only program type that you can flip it to XML and then magically get XML is for Oracle Reports. For plsql you will need to recode the plsql to generate XML rather than text that you have now.
    You have some options, best option first:
    1. Move the sql to a data template - check the user guide and blog for help or
    2. Use SQL XML or XMLGEN (not great for large datasets) or
    3. Use dbms_output.put_line and write the XML file manually - not performant at all
    Regards, Tim

  • Problem while calling webservice from a plsql stored procedure

    Hi everybody,
    I need to call a webservice from a plsql stored procedure.
    I was following documentation published in the otn at the following link.
    "http://www.oracle.com/technology/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html"
    I am encountering the following error on my sql prompt-
    SQL> exec dbms_output.put_line(time_service.get_local_time('94065'));
    BEGIN dbms_output.put_line(time_service.get_local_time('94065')); END;
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1022
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at "APPS.DEMO_SOAP", line 65
    ORA-06512: at "APPS.TIME_SERVICE", line 13
    ORA-06512: at line 1
    Has anybody worked on the same example. Please direct me.
    Thanks & Regards
    Kiran Kumar

    Kiran, were you able to solve this?
    I am facing the same error.
    Oracle Server is Unix and webservice is .NET.
    I am able to connect to Java web service.

  • Publish PLSQL stored procedure as web services

    Is it true that PLSQL stored procedure can only be published as web services using JAVA?
    I came across article that mention how to call other web services from within plsql, but not sure the vice versa.
    So, please advise.
    Thank you.

    True..I've done it once using J-Developer.
    http://www.oracle.com/technology/obe/obe1013jdev/ws/wsandascontrol.htm#o
    Good luck!!
    Bhagat

  • Wrapped PLSQL Stored Procedure

    Hi,
    Referring to Oracle 9i Enterprise Edition.
    PLSQL stored procedure that is wrapped, can it be unwrapped?
    After it is wrapped, is the original source still store inside the database dictionary or somewhere hidden in the database?
    Please advise.
    Thanks.

    PLSQL stored procedure that is wrapped, can it be unwrapped?The primary use for wrapping PL/SQL is for ISVs distributing programs. It's to prevent customers prying into commercially sensitive code. It is also applicable in other security situations. Consequenmtly it doesn't make sense that there would be a clear version hanging around in the distributed app. The presumption is that the person doing the wrapping retains the original unwrapped source.
    Cheers, APC

  • Urgent: unable to call a plsql stored procedure with a struts data action

    Hello ALL,
    I'm trying to call a plsql stored procedure within a struts DataAction,
    The scenario is:
    When a user a click on a button, then it should call a specific stored procedure,,
    I create struts data action a class to handle the event which is to call the procedure
    Here is my code:
    public class RequestAction extends DataForwardAction
    public void onCall(DataActionContext ctx)
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
    try{
    AppModuleImpl myAm = (AppModuleImpl)am;
    DBTransaction tr = (DBTransaction) myAm.getTransaction();
    CallableStatement stmt = tr.createCallableStatement
    ("begin pkg_test.test; end;", DBTransaction.DEFAULT);
    stmt.execute();
    stmt.close();
    tr.commit();
    catch(Exception e){System.out.println(e.getMessage());}
    Configuration.releaseRootApplicationModule(am,true);
    but when I ran the application and click on the button, I got the following Exception:
    04/07/08 00:45:50 ORA-06550: line 1, column 7:
    PLS-00201: identifier 'PKG_TEST.TEST' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    It seems that the DBTransaction object unable to see the stored procedure,
    Am I do something wrong or miss something???
    I've checked the examples on the OTN HOW TO, and searched in the JDeveloper Forum but unable to find an answer,
    Please anyone can help???
    Thanks a lot
    With Regards,
    Hayat

    Here's an example application that illustrates how to do this. I haven't had a chance to writeup a little paper to go with it yet, but will as soon as I have a chance.
    http://otn.oracle.com/products/jdev/tips/muench/storedproc/CallStoredProc.zip
    See the "callStoredProcedure" method in the application module in the Model project.
    See the "callStoredProcedure" method binding in the binding container of the "CallStoredProcedure" data page.
    Notice the name "event_callStoredProcedure" of the (Call Stored Procedure) button on the CallStoredProcedure.jsp page which triggers the declaratively invocation of the method.
    You could also call the method from code in a custom data action.
    The code example illustrates how to create your own JDBC prepared statement for invoking the stored procedure, and doing it in a way that is efficient by keeping the prepared statement around across invocations.

  • Requirements for serving Web PLSQL stored procedures

    Hi all,
    Can someone tell me what I need to host Web based PLSQL stored procedures?
    I was told by Oracle Corp that I only needed 9i but after looking through all the documentation and these message boards, I think I need 9iAS.
    If I need 9iAS, do I also need 9i?
    And if so, can they coexist on the same Sun Solaris box?
    Any help would be greatly appreciated.
    Thanks in advance
    Aaron

    You'll need both - the Application Server to serve the pages, and the database to store the PL/SQL code. Yes, the two can co-exist - as long as they are installed in separate directories.
    Hope this helps,
    Ashesh Parekh
    Oracle9iAS Product Management

  • How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?

    Hi
    How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?
    This is my Input data.
    11/25/2007.
    By using below query, it is inserted into database.
    sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));
    But using stored procedure, the same query is not running.
    It shows error like
    ORA-01843: not a valid month ORA-06512: at line 1
    Procedure:
    create or replace procedure Date_Test(datejoin in DATE) is
    begin
    insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    end Date_Test;
    I had used 'nls_date_language = american' also.
    Prcodeure is created but not worked in jsp. The same error is thrown.
    Pls provide a solution

    This might help you....
    SQL> Create Table DateTest(col1 Date);
    Table created.
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    BEGIN Date_Test('11/25/2007'); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    BEGIN Date_Test(To_Date('11/25/2007','mm/dd/yyyy')); END;
    ERROR at line 1:
    ORA-01843: not a valid month
    ORA-06512: at "CTBATCH.DATE_TEST", line 3
    ORA-06512: at line 1
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in DATE) is
    2 begin
    3 insert into datetest values(datejoin);
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test(To_Date('11/25/2007','mm/dd/yyyy'));
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> Select * from DateTest;
    COL1
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL> create or replace procedure Date_Test(datejoin in VarChar2) is
    2 begin
    3 insert into datetest values(to_date(datejoin,'mm/dd/yyyy'));
    4 end ;
    5 /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec Date_Test('11/25/2007');
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select * from DateTest;
    COL1
    25-NOV-07
    25-NOV-07
    Elapsed: 00:00:00.00
    SQL>

  • How to call PLSQL Stored procedure in ADF?

    Hi!
    I am using adf for our development. We have existing stored packages and I want to use them. The problem is how can I call those PLSQL stored procedure in ADF.
    Thanks in advance
    alvin.

    Hi,
    a stored procedure is called by the business service. If e.g. your business service is ADF Business Components then you call a stored procedure from the Application Module's transaction. Call a PLSQL procedure using a prepared statement. Similar you call stored procedures from EJB or TopLink business services
    For ADF Business Components see
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    Frank

  • Creating a Oracle 10g stored procedure as a datasource for  crystal 9 repor

    Can someone direct me to instructions or information on how to create a Oracle 10g stored procedure as a datasource for  my Crystal  Reports 9.0  report?

    i've found this example for you
    http://www.pdssoftware.com/newsletter/mar07/page6.htm
    and you could be able to get the guides from the SAP guide website for the products
    http://help.sap.com/businessobject/product_guides/
    hope this was helpful
    good luck
    Amr

  • How to create a oracle table in PLSQL Stored Procedure ?

    Gurus,
    Any one send the example link to me to create a oracle table through stored procedure ?
    Thanks.
    S

    begin
    EXECUTE IMMEDIATE "CREATE TABLE BLAH (COL1
    NUMBER)";
    nd;By the way, it raises a question as to why you need
    to create a table dynamically?
    Cheers
    Sarma.By the way, you wouldn't use double quotes for execute immediate:
    begin
       EXECUTE IMMEDIATE "CREATE TABLE BLAH (COL1 NUMBER)";
    end;
    Error at line 1
    ORA-06550: line 2, column 22:
    PLS-00114: identifier 'CREATE TABLE BLAH (COL1 NUMBER' too long
    SQL> begin
       EXECUTE IMMEDIATE 'CREATE TABLE BLAH (COL1 NUMBER)';
    end;
    PL/SQL procedure successfully completed.

  • Passing collection parameters from/to Oracle 8i stored procedure to/from Weblogic java program

    Environment- Oracle DB 8.1.7 (Sun) - JDBC OCI 8.1.7 - Application Server (WebLogic 6.0 or 6.1)QuestionHow to pass oracle collection data types from PL/SQL stored procedures to Weblogic java program as in/out stored procedures parameters. I am hitting oracle error 2006 unidentified data type trying to pass the following data types:-o java.sql.Structo java.sql.Arrayo oracle.sql.STRUCTo oracle.sql.ARRAYo oracle.jdbc2.Structo oracle.jdbc2.Arrayo any class implemented oracle.jdbc2.SQLData or oracle.sql.CustomDatumInformationAbout PL/SQL stored procedure limitation which only affects the out argument types of stored procedures calledusing Java on the client side. Whether Java methods cannot have IN arguments of Oracle 8 object or collection type meaning that Java methods used to implement stored procedures cannot have arguments of the following types:o java.sql.Structo java.sql.Arrayo oracle.sql.STRUCTo oracle.sql.ARRAYo oracle.jdbc2.Structo oracle.jdbc2.Arrayo any class implemented oracle.jdbc2.SQLData or oracle.sql.CustomDatum

    this is becoming a mejor problem for me.And are you storing it as a blob?
    Oracle doesn't take varchars that big.
    And isn't LONG a deprecated field type for Oracle?
    From the Oracle docs......
    http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10759/sql_elements001.htm#sthref164
    Oracle strongly recommends that you convert LONG RAW columns to binary LOB (BLOB) columns. LOB columns are subject to far fewer restrictions than LONG columns. See TO_LOB for more information.

  • Calling PLSQL Stored Procedure From HTML Form Submit Button

    Hi there,
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work.
    Lets call them class_number, term, conf These three variables will be passed and the data will be deleted and the person will see a confirmation screen once the delete query has been executed.
    So ideally I would want: ZWGKERCF.P_confdelete(class_number, term, conf) and then the stored procedure would handle the rest!
    Seems pretty simple but I am not sure how to make this happen... My thoughts were:
    Pass the data to this html form (the three fields I need) in hidden variables. Then somehow pass these using POST method to the procedure and read using GET?
    Can someone clarify what the best way to do this is? I have a feeling its something small I am missing - but I would really like some expert insight :-)
    Thanks so much in advance!
    - Jeff

    795018 wrote:
    I am having a little difficulty with calling a stored procedure using an html form button. Here is the code I have right now...
    HTP.PRINT('<form action=ZWGKERCF.P_confdelete>');
    HTP.PRINT('<input type=''submit'' value='' Yes '' onClick=''document.getElementById("mypopup").style.display="none"''>');
    HTP.PRINT('</form></div>');Here is the issue - I need to find a way to pass variables to this stored procedure so it know what data to operate on. This stored procedure will delete data for a specific database record and I must pass three variables to this procedure to make it work. The browser generates a POST or a GET for that form action, that includes all the fields defined in that form. Let's say you define HTML text input fields name and surname for the form. The URL generated for that form's submission will be:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2The browser therefore submits the values of the form as part of the URL.
    The web server receives this. It sees that the base URL (aka location) is serviced by Oracle's mod_plsql. It passes the URL to this module. This module builds a PL/SQL block and makes the call to Oracle. If we ignore the additional calls it makes (setting up an OWA environment for that Oracle session), this is how the call to Oracle basically looks like:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2 );
    end;Thus the PL/SQL web enabled procedure gets all the input fields from the HTML form, via its parameter signature. As you can define parameter values with defaults, you can support variable parameter calls. For example, let's say our procedure also have a birthDate parameter that is default null. The above call will still work (from a HTML form that does not have a date field). And so will the following URL and call that includes a birth date:
    URL:
    http://../ZWGKERCF.P_confdelete?name=value1&surname=value2&birthdate=2000/01/01
    PL/SQL call:
    begin
      ZWGKERCF.P_confdelete( name=> :value1, surname =>  :value2, birthdate => :value3 );
    end;There is also another call method you can use - the flexible 2 parameter interface. In this case the PL/SQL procedure name in the URL is suffixed with an exclamation mark. This instructs the mod_plsql module to put all input field names it received from the web browser into a string array. And put all the values for those fields in another string array. Then it calls your procedure with these arrays as input.
    Your procedure therefore has a fixed parameter signature. Two parameters only. Both are string arrays.
    The advantage of this method is that your procedure can dynamically deal with the web browser's input - any number of fields. The procedure's signature no longer needs to match the HTML form's signature.
    You can also defined RESTful mod_plsql calls to PL/SQL. In which case the call format from the web browser looks different and is handled differently by mod_plsql.
    All this (and more) is detailed in the Oracle manuals dealing with mod_plsql - have a search via http://tahiti.oracle.com (Oracle Documentation Portal) for the relevant manuals for the Oracle version you are using.
    Alternatively, simply download and install Oracle Apex (Application Express). This is a web development and run-time framework and do all the complexities for you - including web state management, optimistic locking, security and so on.

  • Bug? SQL server 7 - Oracle 8i stored procedures

    I'm having a problem converting some SQL 7 stored procedures to Oracle using MW. The cursor definition appears to be garbage in some cases. See example as follows:
    *********** SQL 7 stored procedure *********
    CREATE PROCEDURE CLCClaim
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    @AuditUserId int,
    @AuditLctn varchar(20),
    @ClaimId int
    AS
    DECLARE
    @Trncnt int,
    @ErrorNumber int,
    @Id int,
    @Rows int,
    @ClsnId int
    SELECT @ErrorNumber = -1
    /* Save transaction count value */
    SELECT @Trncnt = @@TRANCOUNT
    /* Issue begin transaction if not already in a transaction */
    If @Trncnt = 0
    BEGIN TRANSACTION T1
    /* Build a cursor for finding child CLClaimAtchm rows */
    DECLARE CLClaimAtchmCursor Cursor For
    SELECT ClaimAtchmId, ClsnId
    FROM dbo.CLClaimAtchm
    WHERE ClaimId = @ClaimId
    /* Open the cursor */
    OPEN CLClaimAtchmCursor
    SELECT @ErrorNumber = @@ERROR
    If @ErrorNumber <> 0 GoTo ErrorHandler
    FETCH Next
    FROM CLClaimAtchmCursor
    INTO @Id, @ClsnId
    ... more follows, but this is the gist of it
    **** Oracle Procedure created by MW
    CREATE OR REPLACE PROCEDURE CLCClaim(
    AuditUserId NUMBER ,
    AuditLctn VARCHAR2 ,
    ClaimId NUMBER )
    AS
    StoO_selcnt INTEGER;
    StoO_error INTEGER;
    StoO_rowcnt INTEGER;
    StoO_crowcnt INTEGER := 0;
    StoO_fetchstatus INTEGER := 0;
    StoO_errmsg VARCHAR2(255);
    StoO_sqlstatus INTEGER;
    Trncnt NUMBER(10,0);
    ErrorNumber NUMBER(10,0);
    Id NUMBER(10,0);
    Rows_ NUMBER(10,0);
    ClsnId NUMBER(10,0);
    CURSOR CLClaimAtchmCursor IS SELECT omwb_emulation.globalPkg.trancount
    FROM CLClaimAtchm
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLClaimDiagCursor IS SELECT StoO_error
    FROM CLClaimDiag
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLClaimAdjdCursor IS SELECT StoO_error
    FROM CLClaimAdjd
    WHERE ClaimId = CLCClaim.ClaimId;
    CURSOR CLSvcLineCursor IS SELECT StoO_error
    FROM CLSvcLine
    WHERE ClaimId = CLCClaim.ClaimId;
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    /* Save transaction count value */
    BEGIN
    CLCClaim.ErrorNumber := -1;
    /* Issue begin transaction if not already in a transaction */
    CLCClaim.Trncnt := omwb_emulation.globalPkg.trancount;
    IF CLCClaim.Trncnt = 0 THEN
    /* Build a cursor for finding child CLClaimAtchm rows */
    /* Emulating @@TRANCOUNT functionality in Oracle model */
    omwb_emulation.globalPkg.trancount:=omwb_emulation.globalPkg.trancount+1;
    SAVEPOINT T1;
    END IF;
    NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
    /* Open the cursor */
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    OPEN CLClaimAtchmCursor;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    CLCClaim.ErrorNumber := StoO_error;
    IF CLCClaim.ErrorNumber <> 0 THEN
    GOTO ErrorHandler;
    END IF;
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    FETCH CLClaimAtchmCursor INTO CLCClaim.Id, CLCClaim.ClsnId;
    EXCEPTION
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_selcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    ...more follows, but the error is in the SELECT clause of the CURSOR declaration
    I'm having to manually fix the CURSOR declarations for these converted procedures.
    Is there a fix or workaround to prevent me from growing my collection of gray hairs?
    Thanks,
    Billy Smith

    William,
    I did a quick check on our latest code and got the following output:
    CREATE OR REPLACE PROCEDURE CLCClaim(
    AuditUserId INTEGER DEFAULT NULL,
    AuditLctn VARCHAR2 DEFAULT NULL,
    ClaimId INTEGER DEFAULT NULL)
    AS
    StoO_selcnt INTEGER;
    StoO_error INTEGER;
    StoO_rowcnt INTEGER;
    StoO_crowcnt INTEGER := 0;
    StoO_fetchstatus INTEGER := 0;
    StoO_errmsg VARCHAR2(255);
    StoO_sqlstatus INTEGER;
    Trncnt INTEGER;
    ErrorNumber INTEGER;
    Id INTEGER;
    Rows INTEGER;
    ClsnId INTEGER;
    CURSOR CLClaimAtchmCursor IS
    SELECT ClaimAtchmId, ClsnId
    FROM /*standalone*/sa.CLClaimAtchm
    WHERE ClaimId = CLCClaim.ClaimId;
    /* Procedure: CLCClaim */
    /* Description: Cascading delete to child tables */
    /* Table: CLClaim */
    /* Generated: 4/23/01 2:31:21 PM */
    /* Save transaction count value */
    BEGIN
    CLCClaim.ErrorNumber := -1;
    /*[SPCONV-ERR(26)]:('@TRANCOUNT') Global Variable treated as variable*/
    /* Issue begin transaction if not already in a transaction */
    CLCClaim.Trncnt := CLCClaim.TRANCOUNT;
    IF CLCClaim.Trncnt = 0 THEN
    /* Build a cursor for finding child CLClaimAtchm rows */
    SAVEPOINT T1;
    END IF;
    NULL;/*DECLARE CURSOR CLClaimAtchmCursor */
    /* Open the cursor */
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    OPEN CLClaimAtchmCursor;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    CLCClaim.ErrorNumber := StoO_error;
    IF CLCClaim.ErrorNumber <> 0 THEN
    GOTO ErrorHandler;
    END IF;
    BEGIN
    StoO_error := 0;
    StoO_rowcnt := 0;
    StoO_crowcnt := 0;
    FETCH CLClaimAtchmCursor INTO
    CLCClaim.Id, CLCClaim.ClsnId;
    EXCEPTION
    WHEN OTHERS THEN
    StoO_rowcnt := 0;
    StoO_selcnt := 0;
    StoO_error := SQLCODE;
    StoO_errmsg := SQLERRM;
    END;
    IF CLClaimAtchmCursor%NOTFOUND THEN
    StoO_sqlstatus := 2;
    StoO_fetchstatus := -1;
    ELSE
    StoO_sqlstatus := 0;
    StoO_fetchstatus := 0;
    END IF;
    END CLCClaim;
    If this is not sufficient please give a complete testcase and migration workbench version to support email address: [email protected] so the bug can be reproduced and logged.
    Turloch
    Oracle Migration Workbench Team

  • Execute Oracle Java Stored Procedure in Pro*C

    I found this is a very usefull example of calling Java procedure via Pro*C module. You could find the source and instructions at: http://www.oracle.com/technology/sample_code/tech/java/travel/travelschema.htm#user.
    Some minor issues arose during installation of C/C++ environment. I use MS Visual Studio 6 and it works just fine. Also you have to be very observant when modifying "procCallJSP.bat" file where SETing environment variables.
    I found some flaw in Pro*C "procCallJSP.pc" script. During the execution of "procCallJSP.exe", when you provide not numeric argumet at the command prompt (eg. ` ) it puts the program to infinite loop. It needs an additional check to eliminate such kind of typing. The change needs to applied at line # 142 in "procCallJSP.pc". Other then that it works OK.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by tomon Lee ([email protected]):
    I try to call a stored procedure of oracle8i
    in Pro*c using follow statement:
    EXEC SQL EXCUTE
    BEGIN
    insert_date(sysdate,:out_timecode);
    END;
    END-EXEC;
    but when i use "proc SQLCHECK=SEMANTICS test.pc" to compile it ,but it return an
    error as follow:
    "insert_date must be declared."
    but the sample code above come from
    oracle8i 8.1.6's documents.
    what's wrong with me?<HR></BLOCKQUOTE>
    If you have right to exec the insert_date ,Check the database connect set in your cfg file

Maybe you are looking for