Need help with Ref Cursor

Dear All,
Version : '11.2.0.2.0'
I have a procedure which gets called from a screen ( on .Net) if use pushes a particular button.
The procedure takes 15 minutes to complete.
My requirement is to intimate the front end(.Net) as soon as the procedures gets called successfully without waiting for its completion as it is going to take 15 mins.
The reason being, the front end will popup a message saying that " The process is going to take long time, A mail will be sent to u after its completion"  once it has been intimated that the procedure has been called successfully.
Could you please suggest can i return a cursor to front end without even manipulating the data.
i hope my question is understandable.

9876564 wrote:
Dear All,
Version : '11.2.0.2.0'
I have a procedure which gets called from a screen ( on .Net) if use pushes a particular button.
The procedure takes 15 minutes to complete.
My requirement is to intimate the front end(.Net) as soon as the procedures gets called successfully without waiting for its completion as it is going to take 15 mins.
The reason being, the front end will popup a message saying that " The process is going to take long time, A mail will be sent to u after its completion"  once it has been intimated that the procedure has been called successfully.
Could you please suggest can i return a cursor to front end without even manipulating the data.
i hope my question is understandable.
It seems to me that your problem is not an Oracle one, but a user interface one.
I'm assuming the slowness of the procedure is due to how long it's taking to query the data, and if you can't speed that up then, to have the procedure return a ref cursor, the connection between the front end and the procedure must be maintained (the process on Oracle must belong to a session, and the front end needs to be connected to that session).
So, you can't have Oracle go off and start a seperate process and then pass back the ref cursor when it's finished, because even though you can spawn off seperate processes such as using DBMS_JOB or DBMS_SCHEDULER, they will run in their own 'session' and the calling code won't keep a hold on any of those sessions... they're effectively stand-alone and seperate.
What you'll have to do is likely get your .net application to spawn off a child process to the main app, that presents the message saying it'll take some time, does the call to Oracle and waits for Oracle to return the resultant ref cursor, which it can then pass back to the main application etc.  Due to .net allowing for multi-tasking, that is where the split processing should take place.

Similar Messages

  • Need help about ref cursor using like table

    Hi Guys...
    I am devloping package function And i need help about cursor
    One of my function return sys_refcursor. And the return cursor need to be
    join another table in database . I don't have to fetch all rows in cursor
    All i need to join ref cursor and another table in sql clause
    like below
    select a.aa , b.cc form ( ref_cursor ) A, table B
    where A.dd = B.dd
    I appeciate it in advance

    My understanding is that you have a function that returns a refcursor and is called by a java app.
    Because this is a commonly used bit of code, you also want to reuse this cursor in other bits of sql and so you want to include it like table in a bit of sql and join that refcursor to other tables.
    It's not as easy as you might hope but you can probably achieve this with pipelined functions.
    Is it a direction that code should be going down? yes, eventually. I like the idea of pulling commonly used bits of code into a SQL statement especially into the WITH section, provided it could be used efficiently by the CBO.
    Is it worth the effort given what you have to do currently to implement it? possibly not.
    what else could you do? construct the sql statement independently of the thing that used it and reuse that sql statement rather than the refcursor it returns?
    Message was edited by:
    dombrooks

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Need help with **** Invalid Cursor State ****

    Hi,
    can someone tell me why am i getting this error....
    //******java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    Any help is greatly appreciated.....
    Thanks in advance.
    //***********this is the output on servlet side**************//
    Starting service Tomcat-Standalone
    Apache Tomcat/4.0.3
    Starting service Tomcat-Apache
    Apache Tomcat/4.0.3
    init
    DBServlet init: Start
    DataAccessor init: Start
    Accessor init: Loading Database Driver: sun.jdbc.odbc.JdbcOdbcDriver
    DataAccessor init: Getting a connection to - jdbc:odbc:SCANODBC
    username SYSDBA
    password masterkey
    DataAccessor init: Preparing searchPolicy
    DataAccessor init: Prepared policySearch
    DataAccessor init: Prepared ssnSearch
    DataAccessor init: End
    After the myDataAccessor
    Database Connection...
    in doGet(...)
    SSSSSSSGetpolicynumber
    In GetPolicyInformation
    b05015195
    Getting Policy Informaton for = b05015195
    okay, building vector for policy
    in GetPolicyInformation for = b05015195
    starting query... policy Information
    finishing query... Policy Information
    Inside the while(next) loop
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    b05015195
    policy information constructor with resultset
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:
    5398)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:383)
    at viewscreenappletservlet.policyinformation.<init>(policyinformation.ja
    va:56)
    at viewscreenappletservlet.DatabaseAccessor.getPolicyInformation(Databas
    eAccessor.java:145)
    at viewscreenappletservlet.Servlet.policyDisplay(Servlet.java:108)
    at viewscreenappletservlet.Servlet.doGet(Servlet.java:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
    :180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
    468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1107)
    at java.lang.Thread.run(Thread.java:484)
    result set closed
    1
    sending response
    Sending policy vector to applet...
    Data transmission complete.

    1) JDBC-ODBC driver is buggy
    2) Some drivers (truly speaking most of them) doesn't
    support cursors or supports them in a wrong way
    Paul

  • Need help with loop cursor

    Hi,
    I'm doing a data conversion and am fairly new to PL/SQL.
    I have a cursor and in the loop i have a select statement
    which returns ORA-01403(no data found). I need to skip this
    row in the cursor and continue with the next.
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    ********(errors on the above select)********
    END LOOP;
    CLOSE cur_fill_split;
    END;
    Thanks,
    Brian

    Hi,
    I think there r 2 methods, one is by giving begin - end inside the loop as shown below 1st ex:
    & the 2nd method is by selecting the record count & then based on that value executing further commands.
    I think 2nd method is more safer than the 1st method.
    Method 1:
    1)
    -- ---------------Procedure Begin------------------
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    BEGIN
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    END;
    END LOOP;
    CLOSE cur_fill_split;
    END;
    -- ---------------Procedure End------------------
    Method 2)
    By selecting the record count & based on that records, deciding the program control.
    -- ---------------Procedure Begin------------------
    declare
    rec_cnt number := 0;
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    /* Here we are using cnt variable & checking for
    the record count, if count = 0, then it will skip */
    select count(*) into rec_cnt from ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    if rec_cnt > 0 then
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    end if;
    END LOOP;
    CLOSE cur_fill_split;
    END;
    -- ---------------Procedure End------------------
    Try it out & mail me
    Good luck

  • Need help with OCI8::Cursor object

    I'm using ActiveRecord::Base.connection.execute to run a SQL statement against an Oracle schema that is "external" to my Rails database.
    I'm building the connection on the fly using connection parameters stored in my Rails database (MySQL).
    So far so good...I can create the connection and run the query...I'm getting back an OCI8::Cursor object and that's where I'm stuck.
    I need to display the results of the query in a Rails view.
    New to Ruby and I'm not sure how to proceed.
    Here's what I'm getting back:
    #<OCI8::Cursor:0xb76c679c @stmttype=1, @svc=#<OCISvcCtx:0xb76c6c24>, @env=#<OCIEnv:0xb7765928>, @defns=[nil, #<OCIDefine:0xb76c5d10>, #<OCIDefine:0xb76c5cd4>, #<OCIDefine:0xb76c5c5c>, #<OCIDefine:0xb76c5bf8>, #<OCIDefine:0xb76c5bd0>, #<OCIDefine:0xb76c5ba8>, #<OCIDefine:0xb76c5b80>, #<OCIDefine:0xb76c5b58>, #<OCIDefine:0xb76c5b30>, #<OCIDefine:0xb76c5b08>, #<OCIDefine:0xb76c5ae0>, #<OCIDefine:0xb76c5ab8>, #<OCIDefine:0xb76c5a90>, #<OCIDefine:0xb76c5a68>, #<OCIDefine:0xb76c5a40>, #<OCIDefine:0xb76c5a18>, #<OCIDefine:0xb76c59f0>, #<OCIDefine:0xb76c59c8>, #<OCIDefine:0xb76c59a0>, #<OCIDefine:0xb76c5978>, #<OCIDefine:0xb76c5950>, #<OCIDefine:0xb76c5928>, #<OCIDefine:0xb76c5914>, #<OCIDefine:0xb76c58d8>, #<OCIDefine:0xb76c58b0>, #<OCIDefine:0xb76c5888>, #<OCIDefine:0xb76c5860>, #<OCIDefine:0xb76c5838>, #<OCIDefine:0xb76c5810>, #<OCIDefine:0xb76c57e8>, #<OCIDefine:0xb76c57c0>, #<OCIDefine:0xb76c5798>, #<OCIDefine:0xb76c5770>, #<OCIDefine:0xb76c5748>, #<OCIDefine:0xb76c5720>, #<OCIDefine:0xb76c56f8>, #<OCIDefine:0xb76c56d0>, #<OCIDefine:0xb76c56a8>, #<OCIDefine:0xb76c5680>, #<OCIDefine:0xb76c5658>, #<OCIDefine:0xb76c5630>, #<OCIDefine:0xb76c5608>, #<OCIDefine:0xb76c55e0>, #<OCIDefine:0xb76c55b8>, #<OCIDefine:0xb76c5590>, #<OCIDefine:0xb76c5568>, #<OCIDefine:0xb76c5540>, #<OCIDefine:0xb76c5518>, #<OCIDefine:0xb76c54f0>, #<OCIDefine:0xb76c54c8>, #<OCIDefine:0xb76c54a0>], @binds=nil, @ctx=[32, #<Mutex:0xb76c6c38>, nil, 65535], @parms=[#<OCIParam:0xb76c66c0>, #<OCIParam:0xb76c66ac>, #<OCIParam:0xb76c6698>, #<OCIParam:0xb76c6684>, #<OCIParam:0xb76c6670>, #<OCIParam:0xb76c665c>, #<OCIParam:0xb76c6648>, #<OCIParam:0xb76c6634>, #<OCIParam:0xb76c6620>, #<OCIParam:0xb76c65f8>, #<OCIParam:0xb76c65e4>, #<OCIParam:0xb76c65d0>, #<OCIParam:0xb76c65bc>, #<OCIParam:0xb76c65a8>, #<OCIParam:0xb76c6594>, #<OCIParam:0xb76c6580>, #<OCIParam:0xb76c656c>, #<OCIParam:0xb76c6558>, #<OCIParam:0xb76c6544>, #<OCIParam:0xb76c6530>, #<OCIParam:0xb76c651c>, #<OCIParam:0xb76c6508>, #<OCIParam:0xb76c64f4>, #<OCIParam:0xb76c64e0>, #<OCIParam:0xb76c64cc>, #<OCIParam:0xb76c64b8>, #<OCIParam:0xb76c64a4>, #<OCIParam:0xb76c6490>, #<OCIParam:0xb76c647c>, #<OCIParam:0xb76c6418>, #<OCIParam:0xb76c638c>, #<OCIParam:0xb76c62c4>, #<OCIParam:0xb76c61e8>, #<OCIParam:0xb76c6080>, #<OCIParam:0xb76c6058>, #<OCIParam:0xb76c5fcc>, #<OCIParam:0xb76c5fb8>, #<OCIParam:0xb76c5f68>, #<OCIParam:0xb76c5f54>, #<OCIParam:0xb76c5ea0>, #<OCIParam:0xb76c5e64>, #<OCIParam:0xb76c5e14>, #<OCIParam:0xb76c5e00>, #<OCIParam:0xb76c5dec>, #<OCIParam:0xb76c5dd8>, #<OCIParam:0xb76c5dc4>, #<OCIParam:0xb76c5db0>, #<OCIParam:0xb76c5d9c>, #<OCIParam:0xb76c5d88>, #<OCIParam:0xb76c5d74>, #<OCIParam:0xb76c5d60>], @stmt=#<OCIStmt:0xb76c6760>>
    My problem is that I simply don't have a firm enough grasp on the basics of Ruby to dissect this thing and get at it's innards.
    If someone could drop me a code snippet that shows how to reference the contents of this in my erb file I think I'll be off to the races.

    If you want low level access to Oracle database then you can use ruby-oci8 API directly without using ActiveRecord.
    You can read about ruby-oci8 API at http://ruby-oci8.rubyforge.org/en/api.html
    But if you want to use ActiveRecord then install and use oracle_enhanced adapter, see http://wiki.github.com/rsim/oracle-enhanced
    If you have any questions about oracle_enhanced adapter then probably it is better to ask them in http://groups.google.com/group/oracle-enhanced discussion group.
    It is not recommended approach to establish ActiveRecord connection and then use low level ruby-oci8 API.
    And if you have some problem then please describe exactly what you are doing and what you would like to achive and then also what error do you get.

  • Urgen I need help with a cursor

    this my cursor, I created it in a button trigger
    DECLARE
    ins_mue_id resultado_v.mue_id%TYPE;
    ins_pru_cod resultado_v.des_pru_codigo%TYPE;
    cursor res_cur IS
    select mue_id, des_pru_codigo from resultado_v where mue_id = :entrar_muestra.mue_mue_id;
    BEGIN
    OPEN res_cur;
    LOOP
    FETCH res_cur INTO ins_mue_id, ins_pru_cod;
    EXIT WHEN res_cur%NOTFOUND;
    INSERT INTO resultados (res_mue_id, res_pru_codigo) values (ins_mue_id, ins_pru_cod);
    commit;
    END LOOP;
    CLOSE res_cur;
    END;
    Something's is wrong because no results were obtained. Please I need yours help

    First of all, I have to correct my previous posting : point 2 was wrong, that type of error can't happen in a cursor, probably I was inattentive :-(
    That said, if the query works correctly in Sql*Plus, then the only difference I can guess is in fields definitions : how are mue_id and :entrar_muestra.mue_mue_id defined ?
    As Frank suggested I'd put a message within the loop to see if and what is read.

  • Need help with comparing cursor row to a collection

    I have been racking my brain trying to get get the code below to work properly. I am loading a table via bulk collect into a collection. I want to run code that tells me if the value of batch_REC.co_id exists or not in co.id collection. The best I have is below. The compiler does not like the MEMBER statement, and I do not know why. I am running 9i if that makes a difference. Any pointers would be extremely helpfull. Thank you.
    Allan Richards
    Washington, D.C.
    --Initiate Procedure
    procedure Check_Company_ID (Batches_cv_in IN refgas.batchCurTyp, truth boolean default null) is
    --DECLARATIONs
    TYPE CO_ID_Array IS TABLE OF NUMBER ;
    Batch_REC t_batch%ROWTYPE;
    number_check EXCEPTION;
    PRAGMA EXCEPTION_INIT(number_check,-6502);
    answer boolean;
    co_id CO_ID_Array;
    c NUMBER;
    --Begin Code
    BEGIN
    dbms_output.put_line('-----');
    dbms_output.put_line('Here is the data from the result set:');
    --Setup Truth Output
    IF truth IS NOT NULL THEN
    dbms_output.put_line(CASE truth WHEN TRUE THEN 'True' WHEN FALSE THEN 'False' END);
    END IF;
    --Select T_COMPANY.COMPANY_ID into a collection
    select t_company.COMPANY_ID
    bulk collect into co_id
    from t_company;
    --Loop through the Cursor
    LOOP
    FETCH Batches_cv_in INTO Batch_REC;
    EXIT WHEN Batches_cv_in%NOTFOUND;
    --Check each co_id per loop for existance in t_company
    BEGIN
    --To detect if an entry is not a compliant number
    c := to_number(Batch_REC.co_id);
    --Checking each number as existing
    answer := c MEMBER OF co_id;
    check_company_id(truth => anwser);
    --Setup for error catching              
    EXCEPTION
    When number_check
    Then
    dbms_output.put_line('Company ID has invalid Characters! ' || Batch_REC.co_id ||' '|| Batch_REC.facility_id ||' '|| Batch_REC.batch_id||' '|| Batch_REC.report_date);
    end;
    END LOOP;
    --Output Total Number of Records in Collection
    dbms_output.put_line('Number of Records: ' || co_id.COUNT);
    --Give "All Good" Statement if all records compare properly
    IF co_id IS NULL THEN
    dbms_output.put_line('All Company IDs are Good');
    end if ;
    end;

    I guess what I looking for then is a work around for 9i. Don't know if you're still watching this thread but you may be interested in this code from Steven Feuerstein (Whom God Preserve).
    Cheers, APC

  • I need help with shooting in my flash game for University

    Hi there
    Ive tried to make my tank in my game shoot, all the code that is there works but when i push space to shoot which is my shooting key it does not shoot I really need help with this and I would appriciate anyone that could help
    listed below should be the correct code
    //checking if the space bar is pressed and shooting is allowed
    if(evt.keyCode == 32 && shootAllow){
        //making it so the user can't shoot for a bit
        shootAllow = false;
        //declaring a variable to be a new Bullet
        var newBullet:Bullet = new Bullet();
        //changing the bullet's coordinates
        newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
        newBullet.x = tank_mc.x;
        //then we add the bullet to stage
        addChild(newBullet);
    listed below is my entire code
    import flash.display.MovieClip;
        //declare varibles to create mines
    //how much time before allowed to shoot again
    var cTime:int = 0;
    //the time it has to reach in order to be allowed to shoot (in frames)
    var cLimit:int = 12;
    //whether or not the user is allowed to shoot
    var shootAllow:Boolean = true;
    var minesInGame:uint;
    var mineMaker:Timer;
    var cursor:MovieClip;
    var index:int=0;
    var tankMine_mc:MovieClip;
    var antiTankmine_mc:MovieClip;
    var maxHP:int = 100;
    var currentHP:int = maxHP;
    var percentHP:Number = currentHP / maxHP;
    function initialiseMine():void
        minesInGame = 15;
        //create a timer fires every second
        mineMaker = new Timer(6000, minesInGame);
        //tell timer to listen for Timer event
        mineMaker.addEventListener(TimerEvent.TIMER, createMine);
        //start the timer
        mineMaker.start();
    function createMine(event:TimerEvent):void
    //var tankMine_mc:MovieClip;
    //create a new instance of tankMine
    tankMine_mc = new Mine();
    //set the x and y axis
    tankMine_mc.y = 513;
    tankMine_mc.x = 1080;
    // adds mines to stage
    addChild(tankMine_mc);
    tankMine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
    function moveHorizontal(evt:Event):void{
        evt.target.x -= Math.random()*5;
        if (evt.target.x >= stage.stageWidth)
            evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
            removeChild(DisplayObject(evt.target));
    initialiseMine();
        //declare varibles to create mines
    var atmInGame:uint;
    var atmMaker:Timer;
    function initialiseAtm():void
        atmInGame = 15;
        //create a timer fires every second
        atmMaker = new Timer(8000, minesInGame);
        //tell timer to listen for Timer event
        atmMaker.addEventListener(TimerEvent.TIMER, createAtm);
        //start the timer
        atmMaker.start();
    function createAtm(event:TimerEvent):void
    //var antiTankmine_mc
    //create a new instance of tankMine
    antiTankmine_mc = new Atm();
    //set the x and y axis
    antiTankmine_mc.y = 473;
    antiTankmine_mc.x = 1080;
    // adds mines to stage
    addChild(antiTankmine_mc);
    antiTankmine_mc.addEventListener(Event.ENTER_FRAME, moveHorizontal);
    function moveHorizontal_2(evt:Event):void{
        evt.target.x -= Math.random()*10;
        if (evt.target.x >= stage.stageWidth)
            evt.target.removeEventListener(Event.ENTER_FRAME, moveHorizontal);
            removeChild(DisplayObject(evt.target));
    initialiseAtm();
    function moveForward():void{
        bg_mc.x -=10;
    function moveBackward():void{
        bg_mc.x +=10;
    var tank_mc:Tank;
    // create a new Tank and put it into the variable
    // tank_mc
    tank_mc= new Tank;
    // set the location ( x and y) of tank_mc
    tank_mc.x=0;
    tank_mc.y=375;
    // show the tank_mc on the stage.
    addChild(tank_mc);
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onMovementKeys);
    //creates the movement
    function onMovementKeys(evt:KeyboardEvent):void
        //makes the tank move by 10 pixels right
        if (evt.keyCode==Keyboard.D)
        tank_mc.x+=5;
    //makes the tank move by 10 pixels left
    if (evt.keyCode==Keyboard.A)
    tank_mc.x-=5
    //checking if the space bar is pressed and shooting is allowed
    if(evt.keyCode == 32 && shootAllow){
        //making it so the user can't shoot for a bit
        shootAllow = false;
        //declaring a variable to be a new Bullet
        var newBullet:Bullet = new Bullet();
        //changing the bullet's coordinates
        newBullet.y = tank_mc.y + tank_mc.width/2 - newBullet.width/2;
        newBullet.x = tank_mc.x;
        //then we add the bullet to stage
        addChild(newBullet);
    if (tank_mc.hitTestObject(antiTankmine_mc))
            //tank_mc.gotoAndPlay("hit");
            currentHP -= 10;
            // remove anti tank mine
            removeChild(antiTankmine_mc);
    if (tank_mc.hitTestObject(tankMine_mc))
            //tank_mc.gotoAndPlay("hit");
            currentHP -= 10;
            // remove anti tank mine
            removeChild(tankMine_mc);
        //var maxHP:int = 100;
    //var currentHP:int = maxHP;
    //var percentHP:Number = currentHP / maxHP;
        //Incrementing the cTime
    //checking if cTime has reached the limit yet
    if(cTime < cLimit){
        cTime ++;
    } else {
        //if it has, then allow the user to shoot
        shootAllow = true;
        //and reset cTime
        cTime = 0;
    function updateHealthBar():void
        percentHP = currentHP / maxHP;
        healthBar.barColor.scaleX = percentHP;
        if(currentHP <= 0)
            currentHP = 0;
            trace("Game Over");
        updateHealthBar();

    USe the trace function to analyze what happens and what fails to happen in the code you showed.  trace the conditional values to see if they are set up to allow a shot when you press the key

  • Need help with a simple process with FTP Adapter and File Adapter

    I am trying out a simple BPEL process that gets a file in opaque mode from a FTP server using a FTP adapter and writes it to the local file system using a File Adapter. However, the file written is always empty (zero bytes). I then tried out the FTPDebatching sample using the same FTP server JNDI name and this work fine surprisingly. I also verified by looking at the FTP server logs that my process actually does hit the FTP server and seems to list the files based on the filtering condition - but it does not issue any GET or RETR commands to actually get the files. I am suspecting that the problem could be in the Receive, Assign or Invoke activities, but I am not able identify what it is.
    I can provide additional info such as the contents of my bpel and wsdl files if needed.
    Would appreciate if someone can help me with this at the earliest.
    Thanks
    Jay

    persiandude wrote:
    Topic: Need help with if, else, and which statements and loops.
    How would I display 60 < temp. <= 85 in java
    System.out.println("60 < temp. <= 85 in java");
    another question is how do I ask a question like want to try again (y/n) after a output and asking that everytime I type in yes after a output and terminate when saying No.Sun's [basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
    Sun's [New To Java Center|http://java.sun.com/learning/new2java/index.html].Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    [http://javaalmanac.com|http://javaalmanac.com]. A couple dozen code examples that supplement [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance].
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's [Thinking in Java|http://mindview.net/Books/DownloadSites] (Available online.)
    Joshua Bloch's [Effective Java|http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_1?ie=UTF8&s=books&qid=1214349768&sr=8-1]
    Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance].
    James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806].

  • Need help with interface development

    Hi i need help with requirement below with developing interface between or online order system and sap plz lemme know what is bapi i use for creating customer, update and assigining partner id to costumer.
    SAP Development
    1.     Using standards SAP functional module (with BAPI), create interface that will create/change Ordering party customer in SAP. Following fields are mandatory for customer creation:
    •     MANDT     Client
    •     VKORG     Sales organization
    •     VTWEG     Distribution Channel
    •     SPART     Division
    •     KDGRP     Customer Group (= “ZORP)
    •     KUNNR     Customer number
    •     NAME1     Name 1
    •     NAME 2     Name 2 (if required)
    •     SORTL     Search term (short description)
    •     ZZALTKN     Search term 2 (old customer number)
    •     LAND1     Country
    •     ORT01     City
    •     PSTLZ      Zip Code
    •     REGIO      Region (state in USA)
    •     STRAS     Street
    •     TELF1     Primary telephone number
    •     TELFX     Primary Fax number
    •     ZZPRPLANS     Payment Plan
    •     CCINS     Payment card: Card type
    •     CCNUM     Payment cards: Card number
    •     CCDEF     Payment Card: Default Card Indicator
    •     ZBDGID     Customer Budget ID
    •     ZHOLD     Budget Hold indicator
    •     ZZCOSTCENT     Cost Center
    2.     Upon successful customer creation system will issues “S” (success) message that customer has been created.
    3.     New ordering party customer created in step ½, will have to be assigned as new partner to its belonging Sold-to/Ship-to customer. Use standard SAP customer functional module in order to perform this partner ID assignment. Partner ID for ordering party should be “ZO”.
    1.7     Enhancement Functionality
    Apart from creating a new interface to do the required functionality, the Order Create Interface also has to be changed to accommodate a field to pass the Ordering Party Number on the Order. The technicalities of how we are going to implement the interface will be laid out in the Tech Specs.
    Thanks
    in advance

    You have double posted, please mark this one as "solved on my own" and refer to this thread
    need help with interface development
    Regards,
    Rich Heilman

  • Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?

    Hi 
    Project Server 2013: I am using Project Server Permission Mode and need help with permission assignments?
    How can I change Permissions for the individual users to see specific projects or all projects in project center and to see specific quick launch items?
    For Example: if i have 4 users, A, B, C and D. what i want is:
    User A can see everything and act as a project manager or Admin.
    User B can view all projects in project centre but can change the schedule or resource assignment etc.
    User C can only act as approver of projects and can view all projects in project centre.
    User D can only view specific projects for which permissions are given.
    can i have some expert help in sorting and understanding permission modes... as i was playing with project server mode permissions and can't figure out how to apply the above scenario to set of my user.
    Thanks in Advance
    Cheers
    AJ
    Ajay Kumar

    Hi Ajay,
    Please refer to this link for detailed explanations about PS2013 security model. 
    http://technet.microsoft.com/en-us/library/cc197638(v=office.15).aspx
    Actually, it will take a couple of days to explain in detail the security model that is a fundamental and tricky aspect of every PS implementation. But basically, you NEVER set permissions for a single user. You have groups in which your insert users. Groups
    define "what users can do". Then you associate groups to a corresponding category. Categories define "what user can see". Thus the association of a group with a category will set "what the user can do on the objects he can see". Then, for more advanced security
    level, you can use the RBS that will consist in "branches" in which you'll insert users. Based on those branches, you'll customize categories to fine-tune what user can see (for projects and resources) depending on the RBS branch and level.
    I'd advice you to start "playing" in a test environment with the default categories/groups that might probably cover your need.
    Concerning your 4 users:
    user A : add him to the "administrator" group. Be careful that you're mentionning either project manager or administrator, which are 2 groups/categories with totally different permissions level.
    user B : basically can see everything and change everything? it could be in the project manager group, assuming that there are no project visibility restrictions on the category via the RBS.
    user C : waht do you mean by "approver"? Workflow approvals? Then it will be the portfolio manager group. Task update or timesheet approval? Then it is another long topic: please refer in the documentation to the "status manager" and "timesheet manager"
    concepts. There are not related to the security model. In a few words, the status manager is the owner of the project plan, is defined for each task and approves tasks updates. The timesheet manager is an attribute defined for each resource in its parameters
    and approves resource timesheet.
    user D : you have to define which permission level must be given to this user. Basically it could be a team member that will see only projects he's in the project team. Note that team member cannot interact with the project plan in another way than submitting
    timesheets and/or tasks updates which must be approved.
    Once more, those are large and complex subjects that require a deep dive into your business model and tons of tests in a test environment.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • I think I need help with driver (software) settings for D110a

    I think I need help with driver (software) settings for D110a all-in-one
    Product: D110a all-in-one
    OS: Windows XP Professional
    Error messages: None
    Changes before problem appeared: None--new installation
    The quality of photo images (mostly JPG files) in printouts is awful even though the files display beautifully on the PC screen. I am using
    IrfanView software for displaying/printing. As far as I can tell, IrfanView is not the problem.
    When I print the same images on a Deskjet 5150 attached to a different PC also running XP Pro and IrfanView, the quality of the printouts is at
    least acceptable, Some would probably say good or very good.
    It's dificult to explain in words the problem with the printouts. A picture of really pretty vegetables (squashes, tomatoes, watermelon, etc) comes
    out much too red. Moreover, the red, which appears shaded on the screen, seems to be all one shade in the D110a printouts.
    Something similar happens to a view of a huge tree in full leaf. On screen, there are subtle variations in the "greenness" of the leaves. In the
    printout, all green is the same shade. In the same printout, the trunk of the tree is all a single shade of grey. It isn;t even obvious that the
    trunk is a round, solid object.
    I liken the effect to audio that disappears entirely when you lower the volume and gets clipped into square waves in even moderately loud passages.
    I don't know whether the D110a driver software permits adjusting the parameters that appear to be set incorrectly, and if adjustments are possible,
    how I would identify which parameters to adjust, how I would access them, or how I would adjust them. I'm hoping that someone can help. Thanks.
    I forgot to mention that I have used the diagnostic application and it tells me that there are no problems.
    e-mail me at [email protected]

    brazzmonkey wrote:
    Hi everyone,
    I noticed the following message when network starts on my gateway
    Warning: This functionality is deprecated.
    Please refer to /etc/rc.conf on how to define a single wired
    connection, or use a utility such as netcfg.
    Then I realized the way network settings should be written in rc.conf has changed. But I can't figure out how this should be done.
    Currently, my set up is the following (old way):
    INTERFACES=(eth0 eth1)
    eth0="dhcp"
    eth1="eth1 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255"
    ROUTES=(!gateway)
    eth0 is on DHCP because the IP is dynamically assigned my ISP.
    eth1 has a fix IP because it's on the LAN side.
    No problem to use DHCP on eth0 with the new settings.
    But for eth1, I don't know what I am supposed to write for gateway.
    Wiki isn't clear on that one either, and it looks like many articles still refer to the old way.
    Any guidance appreciated, thanks.
    brazzmonkey,
    you can't define 2 interfaces the old way (even though I saw some tricky workaround somewhere in the forums).
    Use, f.e., netcfg:
    Comment your old lines.
    In /etc/rc.conf insert:
    NETWORKS=(Eth0-dhcp Eth1-static)
    DAEMONS=(..... !network @net-profiles ....)
    In /etc/network.d create 2 files:
    First one is named  Eth0-dhcp.
    Contents:
    CONNECTION="ethernet"
    DESCRIPTION="Whatever text"
    INTERFACE=eth0
    HOSTNAME="your hostname"
    IP="dhcp"
    DHCP_TIMEOUT=15
    Second one is named Eth1-static.
    Contents:
    CONNECTION='ethernet'
    DESCRIPTION='whatver'
    INTERFACE='eth1'
    HOSTNAME='hname'
    IP='static'
    ADDR='192.168.0.10'
    GATEWAY='192.168.0.1' # your gateway IP
    DNS=('192.168.0.1') # your DNS server
    The names Eth0-dhcp and Eth1-static are not magic. They just must be the same in rc.conf and in /etc/network.d.
    Hope it helps.
    mektub
    PS: netcfg must be installed.
    Last edited by Mektub (2011-07-20 14:07:05)

  • Need help with a simple program (should be simple anyway)

    I'm (starting to begin) writing a nice simple program that should be easy however I'm stuck on how to make the "New" button in the file menu clear all the fields. Any help? I'll attach the code below.
    ====================================================
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Message extends JFrame implements ActionListener {
         public void actionPerformed(ActionEvent evt) {
         text1.setText(" ");
         text2.setText("RE: ");
         text3.setText(" ");
         public Message() {
         super("Write a Message - by Kieran Hannigan");
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         setSize(370,270);
         FlowLayout flo = new FlowLayout(FlowLayout.RIGHT);
         setLayout(flo);
         //Make the bar
         JMenuBar bar = new JMenuBar();
         //Make "File" on Menu
         JMenu File = new JMenu("File");
         JMenuItem f1 = new JMenuItem("New");f1.addActionListener(this);
         JMenuItem f2 = new JMenuItem("Open");
         JMenuItem f3 = new JMenuItem("Save");
         JMenuItem f4 = new JMenuItem("Save As");
         JMenuItem f5 = new JMenuItem("Exit");
         File.add(f1);
         File.add(f2);
         File.add(f3);
         File.add(f4);
         File.add(f5);
         bar.add(File);
         //Make "Edit" on menu
         JMenu Edit = new JMenu("Edit");
         JMenuItem e1 = new JMenuItem("Cut");
         JMenuItem e2 = new JMenuItem("Paste");
         JMenuItem e3 = new JMenuItem("Copy");
         JMenuItem e4 = new JMenuItem("Repeat");
         JMenuItem e5 = new JMenuItem("Undo");
         Edit.add(e5);
         Edit.add(e4);
         Edit.add(e1);
         Edit.add(e3);
         Edit.add(e2);
         bar.add(Edit);
         //Make "View" on menu
         JMenu View = new JMenu("View");
         JMenuItem v1 = new JMenuItem("Bold");
         JMenuItem v2 = new JMenuItem("Italic");
         JMenuItem v3 = new JMenuItem("Normal");
         JMenuItem v4 = new JMenuItem("Bold-Italic");
         View.add(v1);
         View.add(v2);
         View.add(v3);
         View.addSeparator();
         View.add(v4);
         bar.add(View);
         //Make "Help" on menu
         JMenu Help = new JMenu("Help");
         JMenuItem h1 = new JMenuItem("Help Online");
         JMenuItem h2 = new JMenuItem("E-mail Programmer");
         Help.add(h1);
         Help.add(h2);
         bar.add(Help);
         setJMenuBar(bar);
         //Make Contents of window.
         //Make "Subject" text field
         JPanel row2 = new JPanel();
         JLabel sublabel = new JLabel("Subject:");
         row2.add(sublabel);
         JTextField text2 = new JTextField("RE:",24);
         row2.add(text2);
         //Make "To" text field
         JPanel row1 = new JPanel();
         JLabel tolabel = new JLabel("To:");
         row1.add(tolabel);
         JTextField text1 = new JTextField(24);
         row1.add(text1);
         //Make "Message" text area
         JPanel row3 = new JPanel();
         JLabel Meslabel = new JLabel("Message:");
         row3.add(Meslabel);
         JTextArea text3 = new JTextArea(6,22);
         messagearea.setLineWrap(true);
         messagearea.setWrapStyleWord(true);
         JScrollPane scroll = new JScrollPane(text3,
                                  JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                  JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         //SpaceLine
         JPanel spaceline = new JPanel();
         JLabel spacer = new JLabel(" ");
         spaceline.add(spacer);
         row3.add(scroll);
         add(row1);
         add(row2);
         add(spaceline);
         add(spaceline);
         add(row3);
         setVisible(true);
         public static void main(String[] arguments) {
         Message Message = new Message();
    }

    persiandude wrote:
    Topic: Need help with if, else, and which statements and loops.
    How would I display 60 < temp. <= 85 in java
    System.out.println("60 < temp. <= 85 in java");
    another question is how do I ask a question like want to try again (y/n) after a output and asking that everytime I type in yes after a output and terminate when saying No.Sun's [basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
    Sun's [New To Java Center|http://java.sun.com/learning/new2java/index.html].Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    [http://javaalmanac.com|http://javaalmanac.com]. A couple dozen code examples that supplement [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance].
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's [Thinking in Java|http://mindview.net/Books/DownloadSites] (Available online.)
    Joshua Bloch's [Effective Java|http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_1?ie=UTF8&s=books&qid=1214349768&sr=8-1]
    Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance].
    James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806].

  • PLS-00428 Why SELECT must be adorned with REF CURSOR to work?

    hello
    *"PLS-00428: an INTO clause is expected in this SELECT statement"* - This problem has been resolved. I just want to understand WHY SELECT statements need to be paired with REF CURSOR.
              To reproduce this,
                   DECLARE
                        Id1 numeric(19,0);
                        Id2 numeric(19,0);
                        CreateTimestamp date;
                   BEGIN
                   -- ATTN: You'd either need to select into variable or open cursor!
                   select * from SystemUser left join Person on Person.Id = SystemUser.PersonId WHERE Person.PrimaryEmail in ('[email protected]','[email protected]');
                   END;
              Solution?
                   * In install script:
                        CREATE OR REPLACE PACKAGE types
                        AS
                             TYPE cursorType IS REF CURSOR;
                        END;
                   * Then in your query:
                        DECLARE
                             Id1 numeric(19,0);
                             Id2 numeric(19,0);
                             Result_cursor types.cursorType;
                        BEGIN
                        OPEN Result_cursor FOR select * from SystemUser left join Person on Person.Id = SystemUser.PersonId WHERE Person.PrimaryEmail in ('[email protected]','[email protected]');
                        END;
    I Googled for reasonable explaination - closest is: http://www.tek-tips.com/viewthread.cfm?qid=1338078&page=34
    That in oracle block or procedures are expected to do something and a simple SELECT is not!! (Very counter intuitive). What needs to be done is therefore to put the select output into a ref-cursor to fool oracle so that it thinks the procedure/block is actually doing something. Is this explanation right? Sounds more like an assertion than actually explaining...
    Any suggestion please? Thanks!

    Opening a cursor (ref cursor or otherwise) is not the same as executing a select statement.
    A select statement returns data, so if you are using it inside PL/SQL code it has to return that data into something i.e. a local variable or structure. You can't just select without a place for the data to go.
    Opening a cursor issues the query against the database and provides a pointer (the ref cursor), but at that point, no data has been retrieved. The pointer can then be used or passed to some other procedure or code etc. so that it may then fetch the data into a variable or structure as required.
    It's not counter-intuitive at all. It's very intuitive.

Maybe you are looking for

  • Can't get podcasts onto iPod nano!! please please help!

    I've been trying and trying to figure this out but I don't know what the problem is. Whenever I try to sync my podcasts to my ipod it will seem like it's downloading and it will say "syncing ipod. do not disconnect" for about 5 seconds and then it wi

  • Intune Company Portal iOS app - Connection Issue: Unexpected connection issue occured

    Greetings, I am in the process of enrolling an iOS device and I have installed the Intune Company Portal App.  When I attempt to sign in, it starts to redirect me "We are taking you to your company sin-in page" then the app says "Connection Issue, an

  • Errors while starting admin server using WLST and NodeManager

    Hi I am trying to start admin server using WLST and NodeManager. I started nodemanager and WLST successfully. but when I am trying to nmConnect() command I am getting below errors. Please any one tell me where am I going wrong? I copied dumpStack() o

  • Smartform Printing through Batch Job

    Hi Please help in the following issue : We have a report thourgh which say 10 pages needs to be printed. On eachpage we have page numbers like 1 of 10, 2 of 10 etc. and on the last page 10 of 10 will be printed. when the report is executed in foregro

  • Menu disappears when setting layout

    I'm trying to set the layout for my root pane so I can add some buttons, etc. What happens is that if I just include the line: root.setLayout( new BorderLayout()); then the menu doesn't show up anymore. I didn't think the root pane was at that top le