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

Similar Messages

  • Problem in working with multiple cursors in pl/sql block

    I want to develop a procedure to update the values of a colunm for each table.
    Output of cursor (cur_ttbl)will be like :
    Table Name column_name
    Tab1 Col1
    Tab2 col2
    tab3 col3
    Now see below code : In below code I want to append the logic to create a update script to update the table/column returned by first cursor.. I know we have to create a second cursor to go through each record and update that... please suggest the code to do same.
    CREATE OR REPLACE PROCEDURE SOL_TEST(p_message_out OUT VARCHAR2,p_err_ind_out OUT NUMBER)
    IS
    CURSOR cur_ttbl IS
    SELECT table_name,column_name
    FROM port_table;
    lv_SQL_Txt VARCHAR2(4096);
    v_COLNM VARCHAR2(200);
    BEGIN
    FOR rec_ttbl IN cur_ttbl LOOP
    v_COLNM := rec_ttbl.column_name;
    -- Upper case A replacement
    IF INSTR(v_COLNM,chr(63),1) <> 0
    THEN v_COLNM := TRANSLATE(v_COLNM,chr(63),chr(42));
    END IF;
    -- Update the Clintrial record
    lv_SQL_Txt := 'UPDATE ' || cur_ttbl.table_name || ' SET ' || cur_ttbl.column_name || ' = TRIM('||v_COLNM||'), ' ' WHERE '|| 'STATUS= 0 AND STAT= ' || '''' || 'N' || '''';
    EXECUTE IMMEDIATE lv_SQL_Txt;
    lv_SQL_Txt := 'COMMIT';
    EXECUTE IMMEDIATE lv_SQL_Txt;
    END LOOP;
    p_err_ind_out := 0;
    p_message_out := '''';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN NULL;
    WHEN OTHERS THEN
    p_err_ind_out := 1;
    p_message_out := SUBSTR(SQLERRM,1,132);
    END;
    /

    Devgan wrote:
    I want to develop a procedure to update the values of a colunm for each table.To be brutally honest - I see everything wrong with this sample procedure and nothing correct.
    It does not use exceptions. Exceptions are the de facto standard in modern language - not return codes and messages.
    It does not use bind variables for the dynamic SQL created. That will result in a lot of hard parsing (that will reduce that loop's performance by 500% or more). It will also fragment the Shared Pool. A fragmented Shared Pool will cause memory allocation errors.
    The data model, judging from the select and update, uses column and table names as attributes. That is a fundamental violation of data modeling and makes absolutely no sense at all in relational design.
    Still, I suspect that you will ignore these issues (as it seemed was done and lead to this code) and persist in doing it this "+special+" way. In which case, try not to run too hard into the brick wall. And no, one cannot hack holes in that wall. It can only be removed by adhering to fundamentals - from relational design and physical database implementation, to design and coding in PL/SQL and SQL.

  • Sending an Email with a cursor that returns multiple fields.

    I was investigating about sending emails from apex, and I'd like to know if you can help me, I need to send an Email report with multiple fields, I m using this code :
    DECLARE
    CURSOR c1 is
    select id,gk,creation_date,sr_count,issue_notes,sr_impacted,oldest_creation_date
    from gk_report where id = (select max(id) from gk_report);
    reg c1%ROWTYPE;
    begin
    IF (c1%ISOPEN = TRUE) THEN
    CLOSE c1;
    END IF;
    OPEN c1;
    FETCH c1 INTO reg;
    CLOSE c1;
    APEX_MAIL.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => 'Hourly GK Log',
    p_body_html =>
    'GK: '||to_char(reg.gk)||'<br>
    CREATION DATE: '||to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS')||'<br>
    SR COUNT: '||to_char(reg.SR_COUNT)||'<br>
    ISSUE NOTES: '||to_char(reg.ISSUE_NOTES)||'<br>
    SRs IMPACTED: '||to_char(reg.SR_IMPACTED)||'<br>
    OLDEST CREATION DATE: '||to_char(reg.OLDEST_CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_SUBJ => 'Hourly GK Log: ' || to_char(reg.CREATION_DATE,'DD-MON-YYYY HH24:MI:SS'),
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    end;
    In this code there is a cursor that returns just one field, But what about if the cursor returns multiple fields, How can I insert a Loop into this code.?
    Thanks,
    Pablo.

    Hi,
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = 'N' AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error
    ORA-06550: line 18, column 176:
    PLS-00103: Encountered the symbol " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" when expecting one of the following:
    ) , * & = - + < / > at in is mod remainder not rem
    <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset
    The symbol "," was substituted for " AND E.COD_ANALYSIS = A.COD_ANALYSIS ORDER BY AUDITOR" to continue.
    1. DECLARE
    2. p_collection_name VARCHAR2(9000) := 'Report_collection';
    3. begin
    I got out the 'N' quotes of the N :
    DECLARE
    p_collection_name VARCHAR2(9000) := 'Report_collection';
    begin
      IF (apex_collection.collection_exists(p_collection_name => p_collection_name)) THEN
         apex_collection.delete_collection(p_collection_name => p_collection_name);
      END IF;
    apex_collection.create_collection_from_query(
            p_collection_name => 'Report_collection',
            p_query => 'SELECT DISTINCT AUD_SR AS SR,  C.USER_NAME   AS AUDITOR, F.ERROR_NAM  ,  A.AUD_OBSERV AS AUDIT_OBS,D.FEEDBK_OBSERV AS FEEDBACK_OBS , E.ANALYSIS_OBS ,A.AUD_STATUS
    FROM   AUDIT_PROCESS A, MICC_AT_DATA B, MICC_AT_USER C, FEEDBACK_PROCESS D, MICC_AT_ANALISYS E, MICC_AT_ERROR F
    WHERE   B.DATA_MONTH = :P27_MONTH AND B.DATA_SR  = A.AUD_SR AND C.ID = B.DATA_AUDITOR  AND F.ERROR_ID = A.AUD_ERROR AND A.FEEDBACK_COD = D.FEEDBACK_COD AND  D.FEEDBK_AGREE = N AND E.COD_ANALYSIS =  A.COD_ANALYSIS  ORDER BY AUDITOR');
      APEX_MAIL.send(
      p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => p_collection_name ,
    p_body_html => '',
    p_SUBJ => 'hi',
    p_cc => NULL,
    p_bcc => NULL ,
    p_replyto => NULL
    END;
    Error : ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ParseErr:ORA-00904: "N": invalid identifier
    If you can help me would be great, and if you see another mistake please let me know i have not may reach out the solution about it.
    Thanks,
    Pablo.

  • In mail, I am having trouble with my cursor.  It doesn't "land" where I think I'm putting it.  It usually "lands" somewhere below where I "click" it to be.

    In Mail, I am having trouble with my cursor.  When making revisions to what I have already typed, the cursor doesn't "land" where I "click" it to be.  It seems to land somewhere below the spot I click on. It seems to have a mind of its own. 

    Cool handyandy42!
    I'm happy I could be helpful, with solving your problem!
    Also, I notice that you have marked your question as answered, but have not utilized the Helpful or Solved options. That may be intentional, but, if you are not aware of the benefits, of using that function, here is some information.
    When you mark the appropriate posts as Helpful (5 pts) 2 available, or Solved (10 pts) 1 available, you are Thanking the contributors, by awarding them points.
    In threads with multiple replies, it also alerts other readers, to which answers may have been helpful, or solved the issue.
    This info, and more, can be viewed by clicking on
    ? Help & Terms of Use, located under your login name, on all "Discussions" pages.
    Specifically What are question answers?.
    ali b

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • 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

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • I have a plot with two cursors - how can I control the "visible" attribute of the second cursor?

    I have a waveform graph with multiple plots and two cursors. I can use the "cursor->visible" property to control cursor #1 but I cannot seem to find a way to control the visible attribute for cursor #2. Is there a way to do this?
    Thanks,
    RGA

    There's an "Active Cursor" property that allows you select which cursor the following actions operate on. Remember that property nodes "execute" from top to bottom...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Fillable form with multiple pages

    I have a fillable form with multiple pages. However, when I save it and open it, it tabs to the end of the first page and will go back up to the top of the first page again. It won't tab to the second page. Instead, the user will have to click there cursor into the first field of the second page, tab through that, and repeat this process from page to page. If the person doesn't know there are multiple pages, they may believe they have finished the form once they get to the bottom of the first page, hit tab, and it takes them back up to the first field on the first page again. How can I make it go from the last field on the first page, tab, and first field on the second page?

    Thanks for the reply. Since my post to this topic I discovered some things about tabbing. With out adding another master page but just keeping the one and making sure that it's occurance is set to a minimum of one and including master page in the numbering it will work as long as the order of fields in the hierarchy tab matches the order in the position of the fields.
    I have a subForm that has a row of fields starting with a button then several text fields. I couldn't tab to the next page because the button was at the bottom of the hierarchy and it wasn't until I moved it to the top that I could finally tab to the next field on the next page. I also discovered that with a one page dynamic interactive form that has some expand able text fields in it and when the field expands so that any fields are pushed to a new second page tabbing seems to not work. In other words when I tab out of that field that is suppose to expand and a new page is added to the form the tabbing quits and in order for it to resume I have to click in a field and from then on it work even if it gets to where a third page and so forth is added. It is just when a one page (in my case) form turns into multiple pages for the first time.
    Hope that makes sense.

  • 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.

  • UI Design help / Slider with multiple thumbs?

    I've got an application which is trying to set multiple bounds
    around a single value. For instance, if my value was "temperature",
    possible bounds might be cold, temperate, hot.
    I want my user to be able to assign all of those ranges.
    My first thought was to use a slider with multiple thumbs. I could
    have 0 and 100 as min and max, say, with 2 sliders. Everything
    to the left of the first slider is "cold", everything between the two
    sliders is "temperate", and everything to the right of the second
    slider is "hot.
    Of course, JSlider does not have support for multiple thumbs.
    So, I was hoping someone could either suggest a freeware/LGPL
    widget that did *or* could propose a clever redesign to obviate
    the need for one.
    In reality, my problem is more complex -- multiple values with
    varying start values, end values, and number of thresholds. I'm
    using multiple sliders right now, and it's functional, but really fugly.
    Thanks for any help you might be able to provide!
    Eric

    Have found this triple slider from Gene Vishnevsky. Needs some work to adapt to your needs :
    * TripleSlider_Test.java
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import javax.swing.*;
    public class TripleSlider_Test extends JFrame {
        public TripleSlider_Test() {
            setTitle("TripleSlider Test");
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setSize(400,300);
            setLocationRelativeTo(null);
            MyTripleSlider slider = new MyTripleSlider();
            add(slider, BorderLayout.NORTH);
        public static void main(String args[]) {
            new TripleSlider_Test().setVisible(true);
        class MyTripleSlider extends TripleSlider{
             * This method is called when the "thumb" of the slider is dragged by
             * the user. Must be overridden to give the slider some behavior.
            public void Motion(){
                // TODO add your handling code here:
    * TripleSlider
    * Description:     Slider with two thumbs that divide the bar
    *   into three parts. Relative size of each part is
    *   the value of that part, so the three values add up to 1.
    * Author: Gene Vishnevsky  Oct. 15, 1997
    * This class produces a slider with 2 thumbs that has 3 values.
    class TripleSlider extends JPanel  {
        private final static int THUMB_SIZE = 14;
        private final static int BUFFER = 2;
        private final static int TEXT_HEIGHT = 18;
        private final static int TEXT_BUFFER = 3;
        private final static int DEFAULT_WIDTH = 300; //200;
        private final static int DEFAULT_HEIGHT = 15;
        /** Array that holds colors of each of the 3 parts. */
        protected Color colors[];
        private boolean enabled=true;
        private Dimension preferredSize_;
        /* this value depends on resizing */
        protected int pixMin_, pixMax_, width_;
        private int pix1_, pix2_;               // pixel position of the thumbs
        private double values[];                    // the 3 values
        /** current font of the labels. */
        protected Font font;
         * Enables/disables the slider.
        public void setEnabled( boolean flag ) {
            enabled = flag;
         * Constructs and initializes the slider.
        public TripleSlider() {
            values = new double[3];
            colors = new Color[3];
            preferredSize_ = new Dimension( DEFAULT_WIDTH,
                    DEFAULT_HEIGHT + TEXT_HEIGHT + TEXT_BUFFER );
            font = new Font("TimesRoman", Font.PLAIN, 12);
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            pixMax_ = DEFAULT_WIDTH - THUMB_SIZE - 1;
            width_ = DEFAULT_WIDTH;
            resize( width_, DEFAULT_HEIGHT + TEXT_HEIGHT /*�+ TEXT_BUFFER*/ );
            setValues( 0.33333, 0.33333 );
            setColor( 0, Color.blue );
            setColor( 1, Color.green );
            setColor( 2, Color.red );
            addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent evt) {
                    mouseDown(evt);
            addMouseMotionListener(new MouseMotionAdapter() {
                public void mouseDragged(MouseEvent evt) {
                    mouseDrag(evt);
         * Sets color of a part.
        public void setColor( int part, Color color ) {
            colors[part] = color;
         * Returns color of a part.
         * @return current part's color.
        public Color getColor( int part ) {
            return colors[part];
         * This method is called by the runtime when the slider is resized.
        public void reshape( int x, int y, int width, int height ) {
            // setBounds() is not called.
            super.reshape(x, y, width, height);
            width_ = width;
            pixMin_ = THUMB_SIZE;
            pixMax_ = width - THUMB_SIZE - 1;
            // recompute new thumbs pixels (for the same values)
            setValues( values[0], values[1], values[2] );
            repaint();
        private void setValues( double a, double b, double c ) {
            // we know the values are valid
            values[0] = a;
            values[1] = b;
            values[2] = c;
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            pix1_ = (int)(a * total) + THUMB_SIZE;
            pix2_ = (int)(b * total) + pix1_ + THUMB_SIZE * 2;
         * Sets new values of the slider.
         * is 1 - a - b.
        public void setValues( double a, double b ) {
            double sum_ab = a + b;
            if( sum_ab > 1. || sum_ab < 0. ) {
                /* invalid input: should throw exception */
                System.out.println("invalid input");
                return;
            /* call this private method */
            setValues( a, b, 1 - sum_ab );
            repaint();
        private void updateValues() {
            double total = (double)( width_ - THUMB_SIZE * 4 ); // sum
            int a = pix1_ - THUMB_SIZE;
            int b = pix2_ - pix1_ - THUMB_SIZE * 2;
            int c = width_ - (pix2_ + THUMB_SIZE);
            values[0] = (double)a / total;
            values[1] = (double)b / total;
            values[2] = (double)c / total;
         * Returns value for a part.
         * @return value for the part.
        public double getValue( int part ) {
            return values[part];
         * This method is called when the "thumb" of the slider is dragged by
         * the user. Must be overridden to give the slider some behavior.
        public void Motion() {
         * Paints the whole slider and labels.
        public void paint( Graphics g ) {
            int width = size().width;
            int height = size().height;
            g.setColor( Color.lightGray );          // bground
            g.fillRect( 0, 0, width, TEXT_HEIGHT );
            g.setColor( colors[0] );
            g.fillRect( 0, TEXT_HEIGHT,
                    pix1_ - THUMB_SIZE, height - TEXT_HEIGHT );
            g.setColor( colors[1] );
            g.fillRect( pix1_ + THUMB_SIZE, TEXT_HEIGHT,
                    pix2_ - pix1_ - THUMB_SIZE * 2, height - TEXT_HEIGHT );
            g.setColor( colors[2] );
            g.fillRect( pix2_ + THUMB_SIZE, TEXT_HEIGHT,
                    width_ - pix2_ - THUMB_SIZE, height - TEXT_HEIGHT );
            /* draw two thumbs */
            g.setColor( Color.lightGray );
            g.fill3DRect( pix1_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.fill3DRect( pix2_ - THUMB_SIZE, TEXT_HEIGHT /*+ BUFFER*/,
                    THUMB_SIZE * 2 + 1, height /*- 2 * BUFFER*/ - TEXT_HEIGHT,
                    true);
            g.setColor( Color.black );
            g.drawLine(pix1_, TEXT_HEIGHT + BUFFER + 1,
                    pix1_, height - 2 * BUFFER);
            g.drawLine(pix2_, TEXT_HEIGHT + BUFFER + 1,
                    pix2_, height - 2 * BUFFER);
            g.setFont(font);
            // center each value in the middle
            String str = render( getValue(0) );
            g.drawString(str,
                    pix1_ / 2 - (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(1) );
            g.drawString(str,
                    (pix2_ - pix1_ ) / 2 + pix1_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
            str = render( getValue(2) );
            g.drawString(str,
                    (width_ - pix2_ ) / 2 + pix2_ -
                    (int)(getFontMetrics(font).stringWidth(str) / 2),
                    TEXT_HEIGHT - TEXT_BUFFER);
        private String render(double value){
            DecimalFormat myF = new DecimalFormat("###,###,###.#");
            return myF.format(value);
         * An internal method used to handle mouse down events.
        private void mouseDown(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * An internal method used to handle mouse drag events.
        private void mouseDrag(MouseEvent e) {
            if( enabled ) {
                HandleMouse((int)e.getPoint().getX());
                Motion();
         * Does all the recalculations related to user interaction with
         * the slider.
        protected void HandleMouse(int x) {
            boolean leftControl = false;
            int left = pix1_, right = pix2_;
            int xmin = THUMB_SIZE;
            int xmax = width_ - THUMB_SIZE;
            // Which thumb is closer?
            if( x < (pix1_ + (pix2_ - pix1_) / 2 ) ) {
                leftControl = true;
                left = x;
            } else {
                right = x;
            /* verify boundaries and reconcile */
            if( leftControl ) {
                if( left < xmin ) {
                    left = xmin;
                } else if( left > (xmax - THUMB_SIZE*2) ) {
                    left = xmax - THUMB_SIZE*2;
                } else {
                    if( left > (right - THUMB_SIZE * 2) && right < xmax ) {
                        // push right
                        right = left + THUMB_SIZE * 2;
            } else {
                // right control
                if( right > xmax ) {
                    right = xmax;
                } else if( right < (xmin + THUMB_SIZE*2) ) {
                    right = xmin + THUMB_SIZE*2;
                } else {
                    if( right < (left + THUMB_SIZE * 2) && left > xmin ) {
                        // push left
                        left = right - THUMB_SIZE * 2;
            pix1_ = left;
            pix2_ = right;
            updateValues();
            repaint();
         * Overrides the default update(Graphics) method
         * in order not to clear screen to avoid flicker.
        public void update( Graphics g ) {
            paint( g );
         * Overrides the default preferredSize() method.
         * @return new Dimension
        public Dimension preferredSize() {
            return preferredSize_;
         * Overrides the default minimumSize() method.
         * @return new Dimension
        public Dimension minimumSize() {
            return preferredSize_;
    }

  • 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 insert autoincrement record and query it with multiple keys

    Hi all,
    I am not familiar with BerkeyleyDB, I am now doing a project that needs to insert records and then query it out with multiple keys at later time. Since there is no field that can be distinct primary key, I want to user DbSequence as auto increment primary key to db, and set other index keys as secondary db, then using join cursor to do query with multiple keys.
    I don't know how to use DbSequence, can anyone direct me to a example of using DbSequence as auto increment primary key?
    Regards
    -Bruce

    I figured out the method to insert record with auto increment primary key. I listed the code block below:
    char m_SeqNamePositions[32] = "MyPositions";
    DbSequence *m_pSeqPositions;
    m_pDBPositions = new Db(NULL, 0);
              m_pDBPositions->open(NULL, pszFileName, szFileName, DB_BTREE, DB_CREATE, 0);          // 无数据文件
              m_pSeqPositions = new DbSequence(m_pDBPositions, 0);
              Dbt key((void *)m_SeqNamePositions, (u_int32_t)strlen(m_SeqNamePositions));
              m_pSeqPositions->open(NULL, &key, DB_CREATE);
    db_seq_t SeqNum;
         m_pSeqPositions->get(0, 1, &SeqNum, 0);
         Dbt key((void *)&SeqNum, (u_int32_t)sizeof(SeqNum));
         Dbt data(pRecord, sizeof(*pRecord));
         return m_pDBPositions->put(NULL, &key, &data, DB_NOOVERWRITE);
    m_pSeqPositions->close(0);
              m_pDBPositions->close(0);
    delete m_pSeqPositions;
    delete m_pDBPositions;
              m_pDBPositions = NULL;

  • LOV Problem with multiple values

    HI All,
    I have a problem with LOV .When ever i click LOV after search button all values are displaying fine.
    But when i get so many values i want to select only one vlaue that is not cmng to the main page ....Cursor is in running state always after that time out error is coming in my application .
    This problem is coming with with only single value selection in lOV only problem with Multiple values retrival that time only...
    (Iam using 11.1.1.3 Jdeveloper.)
    Thanx in advance...

    duplicate of {thread:id=2286814}

Maybe you are looking for

  • I cannot get through to my yahoo mail - can log in but receive an error msg

    As above, I receive the following message when I try to login to yahoo mail. This has been a problem ever since downloading some awful program called Babylon, which was claiming to give me a TV programme download I was after. I have cleared recent co

  • AT200 pairing with Bluetooth Mouse

    I've just bought an AT200 tablet, my first Android device which i've upgraded to ICS (Android v4.02) I'm trying to pair a bluetooth mouse with the tablet. Like many bluetooth devices, the mouse requires no passcode, but when I try to pair with it And

  • Services.msc window not opening in Windows Server 2012

    Hi, I have installed Windows Server 2012 on my laptop, when I am typing services.msc in run, the services management window opens and closes immediately and no logs in event viewer. Same thing happens with Task Manager. I am not able to diagnose this

  • How to view GPS metadata in preview?

    Hi! It seems possible to view metadata in Preview by opening a file, hitting cmd+I and selecting GPS (sorry, it is in Italian – http://apple.hdblog.it/2010/08/23/come-accedere-a-tante-informazioni-delle-foto- fatte-con-iphone-tramite-anteprima/). But

  • Ich kann plötzlich keine CD-Cover mehr empfangen/laden.

    Ich habe nichts an den Einstellungen meines PCs oder itunes verändert. Bis gestern hat noch alles wunderbar geklappt, jetzt plötzlich gar nicht mehr.