Multiple Mice, Multiple Cursors

Does anyone know how to get two cursors on the screen and work them with two mice? I found a script for windows, but nothing seems to be out there for Mac. Any help would be most appreciated.
iMac   Mac OS X (10.4.8)  

'... nothing seems to be out there for Mac' - correct.

Similar Messages

  • Effect of Multiple cursors in Function Module Extractors

    Hi,
    I am trying to use multiple cursors in an FM extractor, like this:
    OPEN CURSOR WITH HOLD c1 FOR <select query 1>.
    OPEN CURSOR WITH HOLD c2 FOR <select query 2>.
    FETCH NEXT CURSOR c1
                   INTO CORRESPONDING FIELDS
                   OF TABLE i_equi.
    FETCH NEXT CURSOR c2
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE i_equi.
    " Further processing of equipments
    " obtained in i_equi
    I am also checking SY-SUBRC, after each Fetch statement. If both cursors happen to be empty, the extractor exits by raising no_more_data, like other extractors.
    It is possible to do so, since I just tried it. The question is, are there any disadvantages of this kind of approach in terms of memory or speed?
    Edited by: Suhas Karnik on Sep 29, 2008 12:06 PM

    hI kiran,
    The simple way is to create a data element & domain with value range where u provide set of fixed values or provide a check table to it.
    Use that data element in a table <ztable>.
    Code:
    Parameters:
          p_burks like <ztable>-dataelement.
    Call Function <function_name>
    exporting
    p_burks = p_burks,

  • How to add (multiple) cursors programmatically in an XY graph?

     how to add (multiple) cursors programmatically in an XY graph?
    I am building an XY graph. then I would like to add cursors at certain locations (positioned on x axis) I determine through a program.
    How can I add cursors programatically?
    Thank you.

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • "multiple cursor in a procedure" is possible?

    Hi.. everyone.
    Is it possible , "multiple cursor in one procedure"?
    For example,
    create or replace procedure xxx
    is
    vAAA varchar2(10);
    vBBB varchar2(10);
    cursor cur_1 is select .............................;
    cursor cur_2 is select .............................;
    begin
    -- the first cursor
    open cur_1;
    loop
    end loop;
    close cur_1;
    -- the second cursor
    open cur_2;
    loop
    end loop;
    close cur_2;
    end;
    If it is not possible, what is the way to use
    multiple cursor(more than 2) in ONE procedure?
    Thanks in advance.
    Have a nice day.
    Ho.

    no problem
    SQL> drop procedure xxx;
    Procedure dropped.
    SQL> CREATE OR REPLACE
      2  procedure xxx
      3  is
      4  vAAA varchar2(10);
      5  vBBB varchar2(10);
      6  cursor cur_1 is select employee_id from employees where rownum < 2;
      7  cursor cur_2 is select department_id from departments where rownum < 2;
      8
      9  begin
    10  -----------------------------------------------
    11  -- the first cursor
    12  -----------------------------------------------
    13  dbms_output.put_line('Cursor 1 Result');
    14  open cur_1;
    15  loop
    16    fetch cur_1 into vAAA;
    17    exit when cur_1%notfound;
    18    dbms_output.put_line(vAAA);
    19  end loop;
    20  close cur_1;
    21  -----------------------------------------------
    22  -- the second cursor
    23  -----------------------------------------------
    24  dbms_output.put_line('Cursor 2 Result');
    25  open cur_2;
    26  loop
    27    fetch cur_2 into vBBB;
    28    exit when cur_2%notfound;
    29    dbms_output.put_line(vBBB);
    30  end loop;
    31  close cur_2;
    32  -----------------------------------------------
    33  end;
    34  /
    Procedure created.
    SQL> execute xxx;
    Cursor 1 Result
    100
    Cursor 2 Result
    10
    PL/SQL procedure successfully completed.

  • [Help] statement.executeQuery(query) opens MULTIPLE cursors

    Hey everyone,
    I'm having a real hard time finding anything about this on the net so I've turned here. When we call:
    resultSet = statement.executeQuery(query)
    from a servlet for some reason that one executeQuery opens anywhere from 9-12 cursors in our oracle DB. All the executeQuery documentation I could find just said it should open 1 cursor for that particular ResultSet. query is a fairly simple SQL statement, it searches multiple tables but that doesn't explain why it should open so many cursors.
    On a side note the resultSet and statement are global to the method and are closed in the finally block, no SQLExceptions are thrown further adding to my confusion.
    If anyone has seen something like this where executing 1 query opens multiple cursors please let me know any information you might have.
    Thanks in advance
    -Dave

    Hi Dave
    I had a similar problem using the Oracle 8i, but my query was a more complicated than yours and opened a lot of cursors.
    The answer is to close every ResultSet and the Statement:
    while (xxResult.next()){ ... }
    xxResult.close();
    xxResult.getStatement().close();
    This worked for me,
    Good luck,
    Daniel.

  • Multiple cursor names in xy graph

    Hi,
    I have tried putting the names of multiple cursors that I am using in my xy-graph. But I only able to name only one cursor, not sure where I am going wrong... I want the names of both the cursors appear. I am as such changing the names of the cursors dynamically on the run-time.
    I have attached a .gif, hope I am clear.
    thanks.
    Attachments:
    xy graph.GIF ‏26 KB

    Hi
    This is how I would do it.
    Hope this helps.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Cursor-Names.PNG ‏12 KB

  • Same EMP NUM in multiple cursors

    My plsql program is designed in such way that there are multiple cursors & each cursor needs input as EMPLOYEE NUMBER.
    This EMPLOYEE NUMBER should be same across all the cursors.
    Code is as below.
    Any kind of help here is appreciated. Thank you in advance.
    -- AGTSP
    SET SERVEROUTPUT ON
    alter session set nls_date_format='YYYY-MM-DD';
    DECLARE
        MY_FILE_DIR varchar2(40) := '/usr/tmp2';
        l_output        utl_file.file_type;
        v_file_handle varchar2(30) default 'Legacy_Job_Data.csv';
        buf varchar2(10230);
        v_ps_id varchar2(10);
        v_job_descr varchar2(40);
      v_belonging_name VARCHAR2(100);
      v_sg VARCHAR2(4);
      v_sg_jc VARCHAR2(6);
      v_EFFECTIVE_START_DATE DATE;
      SG VARCHAR2(10);
      v_count number;
    -- CJL DATA COLLECTION STARTS
    -- CURSOR STARTS
        CURSOR C_MAIN IS        
      select
                        EMP.EMPLOYEE_NUMBER AS EMPLOYEE_NUMBER
      , JOB.BELONGING_NAME
      , JOB.CHANGE_REASON_NAME
      , JOB.EFFECTIVE_START_DATE
      , JOB.EFFECTIVE_END_DATE
                    from
                        apps.zshr_employee_v EMP
                        , apps.ZSHR_ASSIGNMENT_V JOB
                    where
                        EMP.EMPLOYEE_NUMBER = JOB.EMPLOYEE_NUMBER
                    and TO_CHAR( EMP.EFFECTIVE_END_DATE , 'YYYY-MM-DD')='4712-12-31'                and JOB.QUALIFICATION_CODE <>'0151'
      ORDER BY EFFECTIVE_START_DATE DESC
    CURSOR C_SCM IS        
      SELECT
                        EMP.EMPLOYEE_NUMBER AS EMPLOYEE_NUMBER
      , JOB.BELONGING_NAME
      , JOB.CHANGE_REASON_NAME
      , JOB.EFFECTIVE_START_DATE
      , JOB.EFFECTIVE_END_DATE
                    from
                        apps.zshr_employee_v EMP
                        , apps.ZSHR_ASSIGNMENT_V JOB
                    where
                        EMP.EMPLOYEE_NUMBER = JOB.EMPLOYEE_NUMBER
                   and TO_CHAR( EMP.EFFECTIVE_END_DATE , 'YYYY-MM-DD') ='4712-12-31' and TO_CHAR( JOB.EFFECTIVE_END_DATE , 'YYYY-MM-DD') <'2008-08-01'
      and TO_CHAR( JOB.EFFECTIVE_START_DATE , 'YYYY-MM-DD') >= '1987-07-01'
      and JOB.QUALIFICATION_CODE <>'0151'
      and rownum=1
      ORDER BY EFFECTIVE_START_DATE ASC
    CURSOR C_CM IS        
      SELECT
                        EMP.EMPLOYEE_NUMBER AS EMPLOYEE_NUMBER
      , JOB.BELONGING_NAME
      , JOB.CHANGE_REASON_NAME
      , JOB.EFFECTIVE_START_DATE
      , JOB.EFFECTIVE_END_DATE
            from
                        apps.zshr_employee_v EMP
                        , apps.ZSHR_ASSIGNMENT_V JOB
                    where
                        EMP.EMPLOYEE_NUMBER = JOB.EMPLOYEE_NUMBER
                   and TO_CHAR( EMP.EFFECTIVE_END_DATE , 'YYYY-MM-DD') ='4712-12-31' and TO_CHAR( JOB.EFFECTIVE_START_DATE , 'YYYY-MM-DD') < '1987-07-01'
      and rownum =1
      ORDER BY EFFECTIVE_START_DATE ASC
    -- MAIN BODY BEGINS
    BEGIN
    -- FILE INITIALIZATION
        l_output := utl_file.fopen(MY_FILE_DIR,v_file_handle, 'w', 32767);
    -- WRITING THE FILE HEADER STARTS
        buf := 'EMPLID'
                    || ',EMPL_RCD'
                    || ',EFFDT'
                    || ',EFFSEQ'
                    || ',CX_EE_ID_NBR'
                    || ',CX_SECT_NM'
                    || ',LOCATION'
                    || ',CX_WRK_LOC_DESCR'
                    || ',JOBCODE'
                    || ',JOB_DESCR'
                    || ',GRADE'
                    || ',COMPRATE '
                    || ',CURRENCY_CODE'
                    || ',COMP_FREQUENCY'
        utl_file.put_line(l_output,buf);
    FOR C_EMP_rec in C_MAIN LOOP
    -- CJL LEGACY JOB DATA COLLECTION
    --PS ID EXTRACTION STARTS
      BEGIN
      select PS_ID INTO v_ps_id from apps.TB03569A where
            EBS_ID=C_EMP_rec.EMPLOYEE_NUMBER;
      EXCEPTION
      WHEN no_data_found THEN
      v_ps_id := 'NO DATA';
      END;
    --PS ID EXTRACTION END
      IF  C_EMP_rec.EFFECTIVE_START_DATE >= '2008/8/1' THEN
        buf := v_ps_id                               /* EMPLID */
               || ',' || 0                             /* EMPL_RCD */
               || ',' || C_EMP_rec.EFFECTIVE_START_DATE         /* EFFDT*/
               || ',' || 0                             /* EFFSEQ*/
               || ',' || C_EMP_rec.EMPLOYEE_NUMBER             /* CX_EE_ID_NBR */
                 || ',' || C_EMP_rec.BELONGING_NAME     /* CX_SECT_NM */
                 || ',' || ''                 /* LOCATION */
               || ',' || 'CX_WRK_LOC_DESCR'               /* CX_WRK_LOC_DESCR */
                 || ',' || C_EMP_rec.SG_JOB_CODE /* JOBCODE */
                 || ',' || v_job_descr               /* JOB_DESCR */
                 || ',' || C_EMP_rec.SG         /* GRADE */
               || ',' || ''       /* COMPRATE */
                 || ',' || 'JPY'               /* CURRENCY CODE */
                 || ',' || '' /* COMP FREQUENCY */
                 || ',' || C_EMP_rec.EMP_SG_T_O_FLG           /* SG T Oth. Flag */
      utl_file.put_line(l_output,buf);
      END IF;
    END LOOP;
    FOR C_SCM_rec in C_SCM LOOP
    --PS ID EXTRACTION STARTS
      BEGIN
      select PS_ID INTO v_ps_id from apps.TB03569A where
            EBS_ID=C_SCM_rec.EMPLOYEE_NUMBER;
      EXCEPTION
      WHEN no_data_found THEN
      v_ps_id := 'NO DATA';
      END;
    --PS ID EXTRACTION END
    buf := v_ps_id                               /* EMPLID */
               || ',' || 0                             /* EMPL_RCD */
               || ',' || C_SCM_rec.EFFECTIVE_START_DATE         /* EFFDT*/
               || ',' || 0                             /* EFFSEQ*/
               || ',' || C_SCM_rec.EMPLOYEE_NUMBER             /* CX_EE_ID_NBR */
                 || ',' || C_SCM_rec.BELONGING_NAME     /* CX_SECT_NM */
                 || ',' || ''                 /* LOCATION */
               || ',' || 'CX_WRK_LOC_DESCR'               /* CX_WRK_LOC_DESCR */
                 || ',' || C_SCM_rec.SG_JOB_CODE /* JOBCODE */
                 || ',' || 'v_job_descr'               /* JOB_DESCR */
                 || ',' || C_SCM_rec.SG         /* GRADE */
               || ',' || ''       /* COMPRATE */
                 || ',' || 'JPY'               /* CURRENCY CODE */
                 || ',' || '' /* COMP FREQUENCY */
                 || ',' || C_SCM_rec.EMP_SG_T_O_FLG           /* SG T Oth. Flag */
      utl_file.put_line(l_output,buf);
    -- SCM DATA COLLECTION STARTS
    END LOOP;
    -- SCM DATA COLLECTION ENDS
    FOR C_CM_rec in C_CM LOOP
    --PS ID EXTRACTION STARTS
      BEGIN
      select PS_ID INTO v_ps_id from apps.TB03569A where
            EBS_ID=C_CM_rec.EMPLOYEE_NUMBER;
      EXCEPTION
      WHEN no_data_found THEN
      v_ps_id := 'NO DATA';
      END;
    --PS ID EXTRACTION END
      BEGIN
      select count(*) INTO v_count from
      SELECT 
      distinct
      EMP.EMPLOYEE_NUMBER
      , JOB.ASSIGNMENT_NUMBER
      , JOB.ASSIGNMENT_ID
      from
      apps.zshr_employee_v EMP
      , apps.ZSHR_ASSIGNMENT_V JOB
      where
      EMP.EMPLOYEE_NUMBER=JOB.EMPLOYEE_NUMBER
      and EMP.EMPLOYEE_NUMBER=C_CM_rec.EMPLOYEE_NUMBER
      EXCEPTION
      WHEN no_data_found THEN
      v_count := 0;
      END;
      IF v_count > 1 THEN
      v_job_descr := 'MHI';
      ELSE
      v_job_descr := 'CM';
      END IF;
      buf := v_ps_id                           /* EMPLID */
               || ',' || 0                             /* EMPL_RCD */
               || ',' || C_CM_rec.EFFECTIVE_START_DATE         /* EFFDT*/
               || ',' || 0                             /* EFFSEQ*/
               || ',' || C_CM_rec.EMPLOYEE_NUMBER             /* CX_EE_ID_NBR */
                 || ',' || C_CM_rec.BELONGING_NAME     /* CX_SECT_NM */
                 || ',' || ''                 /* LOCATION */
               || ',' || 'CX_WRK_LOC_DESCR'               /* CX_WRK_LOC_DESCR */
                 || ',' || C_CM_rec.SG_JOB_CODE /* JOBCODE */
                 || ',' || v_job_descr               /* JOB_DESCR */
                 || ',' || C_CM_rec.SG         /* GRADE */
               || ',' || ''       /* COMPRATE */
                 || ',' || 'JPY'               /* CURRENCY CODE */
                 || ',' || '' /* COMP FREQUENCY */
                 || ',' || C_CM_rec.EMP_SG_T_O_FLG           /* SG T Oth. Flag */
      utl_file.put_line(l_output,buf);
    -- SCM DATA COLLECTION STARTS
    END LOOP;
        utl_file.fclose(l_output);
    END;

    Well, I'm not sure what you're issue is as you haven't told us.
    Typically cursors within cursors or multiple cursors are a bad idea, and you should look to try and combine SQL statements into one statement where possible.
    I do however, notice that you've specifying an operating system path for your directory (/usr/tmp2).  You should not use o/s paths with Oracle, you should use Oracle directory objects e.g.
    The UTL_FILE_DIR parameter has been deprecated by oracle in favour of direcory objects because of it's security problems.
    The correct thing to do is to create a directory object e.g.:
    CREATE OR REPLACE DIRECTORY mydir AS 'c:\myfiles';
    Note: This does not create the directory on the file system. You have to do that yourself and ensure that oracle has permission to read/write to that file system directory.
    Then, grant permission to the users who require access e.g....
    GRANT READ,WRITE ON DIRECTORY mydir TO myuser;
    Then use that directory object inside your FOPEN statement e.g.
    fh := UTL_FILE.FOPEN('MYDIR', 'myfile.txt', 'r');
    Note: You MUST specify the directory object name in quotes and in UPPER case for this to work as it is a string that is referring to a database object name which will have been stored in uppercase by default.

  • Multiple Cursors in an OracleResultSet

    Is it possible to iterate over multiple cursors in an OracleResultSet at the same time, or do you have to iterate over a result set (get all the data), then iterate over another resultset (get all the data). See example code 1 and example code 2 below:
    Example Code 1
    =============
    Map output = new HashMap();
              try {
                   // make connection
                   // send JDBC call
                   ResultSet cursor1 = null;
                   while (cursor1.next()) {
                        CartBean chart = new CartBean();
                        cart.setCartName(cursor1.getString("Name"));
                        cart.setCartType(cursor1.getString("Type"));
                        output.put(cart.getCartName(), cart);
                   ResultSet cursor2 = null;
                   while (cursor2.next()) {
                        CartBean chart = (CartBean) output.get(cursor2
                                  .getString("CartName"));
                        Map series = cart.getSeriesData();
                        series.put(cursor2.getString("Label"), new HashMap());
    Example Code 2
    =============
    Map output = new HashMap();
              try {
                   // make connection
                   // send JDBC call
                   ResultSet cursor1 = null;
                   while (cursor1.next()) {
                        CartBean chart = new CartBean();
                        cart.setCartName(cursor1.getString("Name"));
                        cart.setCartType(cursor1.getString("Type"));
                        output.put(cart.getCartName(), cart);
                   ResultSet cursor2 = null;
                   while (cursor2.next()) {
                        Map series = cart.getSeriesData();
                        series.put(cursor2.getString("Label"), new HashMap());
    }

    Hi Nathan,
    I don't full understand your requirements.  It would help if you could give a bit more background information about what you want to achieve.  Assuming you want one row in temp_store_newta for each store, then the following should do it (untested).
    declare
      l_union sdo_geometry;
      l_remainder sdo_geometry;
    begin
      for r1 in (
      select rowid, store_id, client_id, geometry
      from tmcs.tmcs_all_stores_ta
      where client_id = 1
      and rownum < 4)
      loop
      dbms_output.put_line('The primary --> ' || r1.store_id);
      select sdo_aggr_union(sdoaggrtype(geometry, 0.005))
      into l_union
      from tmcs.tmcs_all_stores_ta
      where client_id = 1
      and sdo_anyinteract(geometry, r1.geometry) = 'TRUE'
      and rowid != r1.rowid;
      l_remainder := sdo_geom.sdo_difference(r1.geometry, l_union, 0.005);
      if l_remainder is not null then
       dbms_output.put_line('Inserting the remainder for ' || r1.store_id);
       insert into tmcs.temp_store_newta values (r1.store_id, r1.store_number, r1.client_id, l_remainder);
      else
       dbms_output.put_line('Nothing left after punching out all the other geometries');
      end if;
    end loop r1;
    commit;
    end;
    John

  • Return multiple cursors

    I need help in figuring out the best solution for returning data through a package which will contain repeating data from multiple tables. For example
    I have two tables one and two
    one(position,name) and contains
    sales, david
    sales, jane
    marketing, jon
    two (name, product_id) contains
    david, 45
    david, 68
    david, 75
    jane, 1
    the user will input position and i need to return a cursor that will contain all the values in tables one and two where names equal each other. So if a person enters in sales i would need to return
    sales, david, 45
    68
    75
    sales, jane 1
    without repeating position and name over and over.

    You may use two ref cursors
    CREATE OR REPLACE PROCEDURE test_ps (
       in_id         NUMBER,
       cur1    OUT   sys_refcursor,
       cur2    OUT   sys_refcursor
    AS
    BEGIN
       OPEN cur1 FOR
          SELECT 1
            FROM DUAL;
       OPEN cur2 FOR
          SELECT 2
            FROM DUAL;
    END;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Multiple cursors and xmlforest

    This is my first time working with XML in PLSQL. I'm trying to parse values from a plsql procedure into a Word document using XML.
    My procedure looks something like:
    CREATE OR REPLACE PROCEDURE GET_XML_FA
    (PP_ID IN VARCHAR2,
    PP_PERIOD IN VARCHAR2
    IS
    result CLOB;
    result1 clob;
    CURSOR my_cur_1 IS
       SELECT XMLForest(to_char(sysdate,'fmMonth DD, YYYY') "sysdate",
                        INITCAP(TRIM(p.p_name))||' ('||p.p_id||')' "person",
                        p_period "period",
                        (SELECT DISTINCT INITCAP(TO_CHAR(det.detail_date,'fmMonth DD,YYYY'))
                         FROM details_table det, abc_table abc, people p
                         WHERE det.fa_seq_num = abc.fa_seq_num
                         AND p.p_seq_num = abc.p_seq_num
                         AND p.p_id LIKE pp_id
                         AND REPLACE((TO_CHAR(abc.from_period,'fmMonth YYYY'))||'-'||INITCAP(TO_CHAR(abc.thru_period,'fmMonth YYYY')),' ','') LIKE pp_period
                         AND det.dtl_code = 'bill'
                         ) "bill_date"            
                        ) xrow
    FROM PEOPLE p
    WHERE p.p_id = PP_ID;
    CURSOR my_cur_2 IS 
                        select XMLForest
                        (Initcap(to_char(det.detail_date,'fmMonth DD,YYYY')) "payment_date",
                         det.detail_amt "payment_amt") xrow
                        from details_table det, abc_table abc, people p
                        where det.fa_seq_num = abc.fa_seq_num
                        and p.p_seq_num = abc.p_seq_num
                        and p.p_id = pp_id
                        AND replace((TO_CHAR(abc.from_period,'fmMonth YYYY'))||'-'||INITCAP(TO_CHAR(abc.thru_period,'fmMonth YYYY')),' ','') like pp_period
                        and det.dtl_code = 'payment';
    BEGIN
    htp.print('<?xml version="1.0" ?>');
    htp.print('<DOCUMENT DOCNAME="My_Letter'||pp_id||'_'||pp_period||'.doc" DESTINATION="'||get_const_value('FA_TRACK_DIR')||'" SOURCE="'||get_const_value('DOCBUILDER_DIR')||'" LOGFILE="'||get_const_value('FA_TRACK_DIR')||'">');
    htp.print('<NOTE FNAME="My_Letter.doc">');
      for my_rec_1 in my_cur_1 loop
      result := my_rec_1.xrow.getClobVal();
       htp.print(result);
      end loop;
      for my_rec_2 in my_cur_2 loop
      result1 := my_rec_2.xrow.getClobVal();
      htp.print(result1);
      end loop;
      htp.print('</NOTE>');
      htp.print('</DOCUMENT>');
    END;my_cur_1 returns a single row of data whereas my_cur_2 returns multiple rows. However, while parsing values into my word document, my_cur_2 passes only the first row and doesn't pass the remaining rows.
    I'm not able to understand what I am doing wrong. Can anyone help?
    Note: get_const_value is our custom function that determines directory path based on server.
    Let me know if more details are required.

    Hi Scorpio,
    my point was very simple. XMLAgg function pre-aggregates the result elements in one row. See example below with simulated dual data.
    select XMLForest
    (rownum "payment_date", 'a' "payment_amt" ) xrow
    from dual connect by level <= 2
    XROW
    <payment_date>1</payment_date><payment_amt>a</payment_amt>
    <payment_date>2</payment_date><payment_amt>a</payment_amt>
    2 rows selected
    select XMLAgg(XMLForest
    (rownum "payment_date", 'a' "payment_amt" )) xrow
    from dual connect by level <= 2
    XROW
    <payment_date>1</payment_date><payment_amt>a</payment_amt><payment_date>2</payment_date><payment_amt>a</payment_amt>
    1 rows selected
    If this doesn't help I'd suggest - simplify the example (consider only the cursor causing problem, use the dual table etc) and post the Oracle version.
    Regards,
    Jaromir

  • Multiple cursors for one plot

    Hi everybody,
    I'm trying to put multiple plots on my XYGraph. I need then that for instance cursor1=f(cursor0).
    Is it possible ? If it's not what are the alternatives ?
    Best regards.
    MartinO.
    Solved!
    Go to Solution.

    MartinO. wrote:
    You tell me that there is no way to link the cursors automatically ...?
    Yes, that's what I'm saying. You have to do it yourself. See attached example (LV 8.2). Note that the second cursor is a free cursor rather than linked to a plot. There's a bug with setting the Y position of a cursor that's linked to a plot. Not sure if it's been fixed - you can contact NI with the CAR that's given in the message in the link I provided.
    Attachments:
    Linked Cursors.vi ‏26 KB

  • Jslider with multiple cursor ?

    I 'd like to have some kind of slider(actually more a kind of timeline) that would permit to set multiple marks for a chart I draw.
    So, it would be handy to have more than one cursor per slider otherwise i 'd have to place up to 13 sliders in my GUI.
    The thing is to see all the 13 markers on one line and to control their presence and position with the mouse. A little bit like the rule you would use to set tabulations\indentations positions in a text processor.
    Is this possible ?
    Maybe there's an already done extension of swing components somewhere that handles it ?

    Use sqlca.sqlerrd[2]
    C:\>type upd_count.pc
    EXEC SQL INCLUDE SQLCA ;
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    char *username = "kkishore";
    char *password = "kkishore";
    char *dbname = "";
    int main(void)
        EXEC SQL WHENEVER SQLERROR DO exit(-1);
        EXEC SQL CONNECT :username IDENTIFIED BY :password USING :dbname;
        printf("\nConnected to ORACLE as user: %s\n", username);
        EXEC SQL UPDATE EMP SET ename = LOWER(ename) ;
        /* Print however many rows were updated. */
        printf("%d rows updated\n", sqlca.sqlerrd[2]) ;
        /* Disconnect from the database. */
        EXEC SQL COMMIT WORK RELEASE;
        exit(0);
        preprocess and compile the program here
    C:\>upd_count
    Connected to ORACLE as user: kkishore
    14 rows updated
    C:\>Message was edited by:
    Kamal Kishore

  • Returning Multiple Cursors

    This is a pretty straightforward question but I'm a bit of a newbie. I'm interested in returning a bunch of data from about 10 or so tables so I can dynamically populate some dropdown lists, etc.
    I'd like to create a stored procudure to do this. What is best practice?
    Should I make one stored procudure that has 10 Out Ref Cursor Paramaters or break this up into multiple Stored Procedures? Is using the Out Ref Cursors the best way of doing this?
    Any help would be much appreciated, Thanks.

    Having one stored procedure returning 10 REF Cursors would give you much better performance then having 10 stored procedures returning one REF Cursor each.

  • Return multiple cursors from one procedure

    Hi,
    I have a stored procedure that is suposed to return multiple records. I know that for each table that I return I have to add a param to the stored procedure, param with ref cursor type.
    I do not know exactly how many tables I have to return, it depends on data from some tables.
    Is it possible to return an unknown number of tables? like an array or something ...
    Please help

    In order to keep it transparent to the developer, I have to translate exactly the stored procedures from SQL Server to Oracle.Well "exactly" is not something that you are going to achieve. You're talking about two disperate languages. That's like saying you want to translate French to English, but it must stay French.
    You obviously want to mimick the existing functionality, but in some cases you're just going to have to bite the bullet and accept that you won't be able to do it totally transparently. In this case, the developers are going to have to make some changes at their end of things too.
    To translate the procedures from T-SQL to Oracle was
    the easiest and most convenient option to the
    developers, so they will not have to write different
    code for Oracle and SQL.But they will. Anyone who evaluated the project and determined that the developers wouldn't need to do anything when moving from one platform to another should be sacked for incompetence.
    ;)

  • How to use bulk in multiple cursors !!

    Hello All,
    I am having a following program that perfectly runs but its taking very huge time to complete it.
    Can any one suggest how i can improve the performace of this code ..
    thanks in advance - appreciate your help .
    Here's the program.
    ==============
    procedure Proc_Fmly_VehicleTA_Cnt is
    CURSOR c_cur_fmly IS SELECT FAMID, NUM_AUTO, NUM_TVAN, VEHQ, VEHQL FROM FMLY;
    CURSOR c_cur_eovb_auto IS SELECT FAMID, VEHICIB ,VEHICYB FROM EOVB WHERE VEHICYB = gv_eovb_vehicyb_automobiles ;
    CURSOR c_cur_eovb_trucks IS SELECT FAMID, VEHICIB ,VEHICYB FROM EOVB WHERE VEHICYB = gv_eovb_vehicyb_trucks ;
    v_total_automobiles number := 0 ;
    v_total_trucks number := 0 ;
    v_procedure errorlog.procedure_name%TYPE default 'Proc_Fmly_VehicleTA_Cnt';
    v_location errorlog.location%TYPE;
    BEGIN
    v_location := 4 ;
    -- global variables gv_eovb_vehicyb_automobiles = 100 gv_eovb_vehicyb_trucks = 110
    -- <<Computing the owned vehicles - automobiles >>
    -- INNER BLOCK
    BEGIN
    FOR i IN c_cur_fmly LOOP
    FOR j IN c_cur_eovb_auto LOOP
    IF ( i.FAMID = j.FAMID ) THEN
    v_total_automobiles := v_total_automobiles + chk_notnull_blank( j.vehicib);
    END IF;
    END LOOP ;
    UPDATE FMLY SET NUM_AUTO = v_total_automobiles WHERE famid = i.famid ;
    v_total_automobiles := 0;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    v_err_code := SQLCODE;
    v_err_msg := substr(SQLERRM, 1, 200);
    INSERT INTO audit_table (error_number, error_message) VALUES (v_err_code, v_err_msg);
    error_logging(p_error_code => substr(sqlerrm,1,9), p_error_message => substr(sqlerrm,12), p_package => 'PKG_FCI_APP',p_procedure => 'Proc_Fmly_VehicleTA_Cnt' , p_location => v_location);
    END;
    -- <<Computing the owned vehicles - trucks >>
    -- INNER BLOCK
    BEGIN
    FOR i IN c_cur_fmly LOOP
    FOR j IN c_cur_eovb_trucks LOOP
    IF ( i.FAMID = j.FAMID ) THEN
    v_total_trucks := v_total_trucks + chk_notnull_blank( j.vehicib);
    END IF;
    END LOOP ;
    UPDATE FMLY SET NUM_TVAN = v_total_trucks WHERE famid = i.famid ;
    v_total_trucks := 0;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    v_err_code := SQLCODE;
    v_err_msg := substr(SQLERRM, 1, 200);
    INSERT INTO audit_table (error_number, error_message) VALUES (v_err_code, v_err_msg);
    error_logging(p_error_code => substr(sqlerrm,1,9), p_error_message => substr(sqlerrm,12), p_package => 'PKG_FCI_APP',p_procedure => 'Proc_Fmly_Vehicle_Cnt' , p_location => v_location);
    END;
    -- END OUTER BLOCK
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    v_err_code := SQLCODE;
    v_err_msg := substr(SQLERRM, 1, 200);
    INSERT INTO audit_table (error_number, error_message) VALUES (v_err_code, v_err_msg);
    error_logging(p_error_code => substr(sqlerrm,1,9), p_error_message => substr(sqlerrm,12), p_package => 'PKG_FCI_APP',p_procedure => 'Proc_Fmly_VehicleTA_Cnt ', p_location => v_location);
    END Proc_Fmly_VehicleTA_Cnt;
    -- ignore error_logging procedure ; its a part of package.
    thanks/kumar
    Edited by: kumar73 on Sep 17, 2010 9:36 AM
    Edited by: kumar73 on Sep 17, 2010 9:37 AM

    btw your exception handler has a couple of problems (I've formatted it for you):
    EXCEPTION
       WHEN OTHERS THEN
          RAISE_APPLICATION_ERROR
          ( -20001, 'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM );
          v_err_code := SQLCODE;
          v_err_msg  := SUBSTR(SQLERRM, 1, 200);
          INSERT INTO audit_table (error_number, error_message) VALUES (v_err_code, v_err_msg);
          error_logging
          ( p_error_code => substr(sqlerrm,1,9)
          , p_error_message => substr(sqlerrm,12)
          , p_package => 'PKG_FCI_APP'
          , p_procedure => 'Proc_Fmly_VehicleTA_Cnt'
          , p_location => v_location ); When RAISE_APPLICATION_ERROR raises the exception, the procedure will terminate and the error logging steps below it won't get called.
    Also if you just want to re-raise an exception without adding any information or your own message etc, then you should use RAISE, not RAISE_APPLICATION_ERROR. If you're going to use RAISE_APPLICATION_ERROR it should be something like:
    RAISE_APPLICATION_ERROR
    ( -20001
    , 'Could not set automobile count to ' || v_total_automobiles || ' for family ' || i.famid
    , TRUE );Notice the last parameter, TRUE, which tells it to keep the existing error stack (i.e. whatever Oracle error made it fail), which will then appear underneath your custom error message. You should never concatenate SQLERRM into a RAISE_APPLICATION_ERROR message. (And SQLCODE is just the error number that is already part of SQLERRM so there is no point including that anyway.)
    Those changes give you something like:
    EXCEPTION
       WHEN OTHERS THEN
          INSERT INTO audit_table (error_number, error_message)
          VALUES (SQLCODE, SUBSTR(SQLERRM,1,200));  -- btw why SUBSTR? Why not log the entire message?
          error_logging
          ( p_error_code => substr(sqlerrm,1,9)
          , p_error_message => substr(sqlerrm,12)
          , p_package => 'PKG_FCI_APP'
          , p_procedure => 'Proc_Fmly_VehicleTA_Cnt'
          , p_location => v_location );
          RAISE_APPLICATION_ERROR
          ( -20001
          , 'Could not set automobile count to ' || v_total_automobiles || ' for family ' || i.famid
          , TRUE );

Maybe you are looking for