Please help about function query permformance

Hi
I have a j2ee web application with oracle database.
I finish the function implementation by put all caculaton inside oracle query ( funciton (todayData - avg(historical data )) / std(historical data) and using group by and sub query .but performance is very slow about 3 minute whick is far from client's 10 second requirement.
My question is if I take raw data from database and do the caculation part in Java will it be faster. Is there some other way to speed up the process?(historical data is big)
Thanks for your time and help

What does the function look like? How is it called? What is the query and explain plan? Are statistics up to date?
My question is if I take raw data from database and do the caculation
part in Java will it be faster.No.
Is there some other way to speed up the process?(historical data is big)You should start by posting the explain plan and looking into the other questions above.

Similar Messages

  • I have been using GRAB to capture screen displays.  It has just stopped working since the last OSX Upgrade.  Can anyone, please help restore functionality?

    I have been using GRAB to capture screen displays.  It has just stopped working since the last OSX Upgrade.  Can anyone, please help restore functionality?

    Thanks for that.  I did as suggested but when I tried again, it still did not work.  Another  com.apple.Grab.plist appeared in the Library.
    I now have the following files in Library
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.LSSharedFil eList.plist.lockfile
    file://localhost/Users/peterpatel/Library/Preferences/
    file://localhost/Users/peterpatel/Library/Preferences/com.apple.Grab.plist.lockf ile
    What do you suggest I do now?

  • Please Help for the Query

    Please Help for the Query
    Hi frds please help me for the below query.What I want to do is to pull out the data from below table :-
    date ticker indicator
    03/13/2008 3IINFOTECH -8
    03/18/2008 3IINFOTECH -4
    03/25/2008 3IINFOTECH -5
    03/27/2008 3IINFOTECH -3
    as such :-
    date ticker indicator
    03/13/2008 3IINFOTECH -8
    03/25/2008 3IINFOTECH -5
    03/27/2008 3IINFOTECH -3
    Here I want to find the Trend i.e either asc or desc order from the lowest indicator.
    In the above sample data -8, -4, -5, -3 out of which I want the asc order data -8, -5, -3 and exclude -4 data.Because the asc order -8, -5, -3 will not follow.
    So I want the data
    date ticker indicator
    03/13/2008 3IINFOTECH -8
    03/25/2008 3IINFOTECH -5
    03/27/2008 3IINFOTECH -3

    SQL> CREATE TABLE BORRAME(FECHA DATE, INDICA VARCHAR2(100));
    Tabla creada.
    SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/13/2008','MM/DD/YYYY'), '3IINFOTECH -8');
    1 fila creada.
    SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/18/2008','MM/DD/YYYY'), '3IINFOTECH -4');
    1 fila creada.
    SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/25/2008','MM/DD/YYYY'), '3IINFOTECH -5');
    1 fila creada.
    SQL> INSERT INTO BORRAME VALUES(TO_DATE('03/27/2008','MM/DD/YYYY'), '3IINFOTECH -3');
    1 fila creada.
    SQL> COMMIT;
    Validación terminada.
    SQL>
    SQL> SELECT FECHA, INDICA
      2  FROM BORRAME
      3  WHERE SUBSTR(INDICA,INSTR(INDICA,'-',1)+1,LENGTH(INDICA)) <> '4'
      4  ORDER BY SUBSTR(INDICA,INSTR(INDICA,'-',1)+1,LENGTH(INDICA)) DESC;
    FECHA                                                                
    INDICA                                                               
    13/03/08                                                             
    3IINFOTECH -8                                                        
    25/03/08                                                             
    3IINFOTECH -5                                                        
    27/03/08                                                             
    3IINFOTECH -3                                                        
                    

  • Please help about Report Printer and PS tables-objects . ..

    Hi everybody
    I'm in trouble. I have a requirement in PS módule related with reports created by the Report Printer tool. I don't have any idea about these topics.
    My requirement is to create a report (not with Report Printer) with the structure for projects, with all the structure Project-WBS-Network-Activity and with some values like Budget, Commit, Actual,  Paid, etc.
    The functional consultant only tells me about some reports created with Report Printer wich have the columns required, some report has the Budget, other one has the Commit, etc. For example, one report is the tcode S_ALR_87013532; i don't know if this transaction exists in all the SAP implementations or if it was created only for my company.
    These reports only show two levels (Project-Network) so i i have to investigate:
    1. How to get all the structure levels (project-WBS-network-activity)
    2. How to 'translate' in code some value showed in a report created with Report Printer, i guess these values are created with formules and objects.
    3. How to get the same values showed in these reports, but for the Networks and Activities.
    I do not know anything about PS module and Report Printer and i really don't have any idea about how to make my development.
    4. I think the functional consultant could be able to create the report himself with the Report Printer, but he tells me he does not manage this tool so good and he wants to send SAP mails with the reports, and he say the reports created with Report Printer can not send mails. Is this true ?  and then, would be easier for me to learn Report Printer and create the report myself instead to develop it ?
    Does somebody can help me ?     Any idea ?
    Please help !!     I don't know even how to start with this.
    Thanks in advance ..
    Frank

    Hi Frank,
    here're some links:
    -http://help.sap.com/saphelp_47x200/helpdata/en/ca/01993862b47c67e10000009b38f8cf/frameset.htm
    -http://www.sapgenie.com/abap/tables_ps.htm
    -Re: Project System Costs: budget/actual/commt/rem.plan/assd
    Andreas

  • Please help with this query!

    Hi All,
    I have this this table:
    Term Grade
    term_A A
    term_A A
    term_A B
    term_A B
    term_B D
    term_B F
    term_B F
    term_C C
    How do I display so that it appears this way?
    term_A A 2
    term_A B 2
    term_B D 1
    term_B F 2
    term_C C 1
    Thank you. Appreciate all the help!

    Please read about [url http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions001.htm#sthref962]aggregate functions in the manual.
    Regards,
    Rob.

  • Please help with a query

    select * from testme;
    NAME VAL
    A 1
    A 2
    A 3
    B 1
    B 2
    B 3
    C 1
    C 2
    I want to get the maximum of name and the maximum of corresponding name's value.
    ie., the answer should be
    Name VAL
    C     2
    Please help me with the query.
    Thnx

    SQL> create table testme
      2  as
      3  select 'A' name, 1 val from dual union all
      4  select 'A', 2 from dual union all
      5  select 'A', 3 from dual union all
      6  select 'B', 1 from dual union all
      7  select 'B', 2 from dual union all
      8  select 'B', 3 from dual union all
      9  select 'C', 1 from dual union all
    10  select 'C', 2 from dual
    11  /
    Tabel is aangemaakt.
    SQL> select max(name) name
      2       , max(val) keep (dense_rank last order by name) val
      3    from testme
      4  /
    NAME VAL
    C      2Regards,
    Rob.

  • Please help about the limit request

    how to connect the internet for the mobile set 3110 classic
    because iam tried bye the contact provide service vodafone
    also contained the internet service provided with it service
    but massage comminig me tell me not contact or connection with internet
    please help me

    note:
    i am reading the note book about set and working it but wihtout ability
    what i do to connection with internet service

  • Please help with some query

    hello all!
    please, help me again.
    we have a foreign key discrepancy and my task is to create a view which will show the 3 aspects.
    Let's we have 3 schemas: A - good (which means that i will compare WITH A, source)
    B and C are bad (which mean that I will checking this schemas).
    So, i need to obtain:
    1) FK that DO NOT exist in B&C and do exist in A
    2) FK that DO exist in bad schemas (B&C) but DO NOT exist in good schema (A)
    3) FK's that exist in both (A&B, A&C) schemas on the SAME TABLE, have THE SAME CONSTRAINT_NAME but are on the DIFFERENT columns.
    the first and second I seem to be done through the
    select CONSTRAINT_NAME, TABLE_NAME, STATUS from dba_constraints where owner='PRIV_MD' and CONSTRAINT_TYPE='R' and CONSTRAINT_NAME
    2 NOT IN (select CONSTRAINT_NAME from dba_constraints where owner ='MSA_MD'); (to get the second task we just reversing owners in query and subquery)
    query. but the third one is really pain in my back. i have a query:
    SELECT a.column_name, b.column_name FROM dba_cons_columns a, dba_cons_columns b, dba_constraints c, dba_constraints d
    WHERE c.CONSTRAINT_TYPE='R'
    AND a.CONSTRAINT_NAME = b.CONSTRAINT_NAME
    AND a.CONSTRAINT_NAME = c.CONSTRAINT_NAME
    AND b.CONSTRAINT_NAME = d.CONSTRAINT_NAME
    AND a.owner = 'PRIV_MD' AND b.owner = 'MSA_MD';
    which runs hours and returns million of rows with the two columns with the same names... but if i'm adding
    AND a.column_name != a.column_name (i'm not sure it's a correct syntax)
    line it returns "no rows selected"
    please, help me obtain it, i'm fighting already the second day..
    (please, don't be angry, i'm just learning and this is my first task on my work...)

    This is basically just a UNION ALL (the constraint columns from both schemas)
    MINUS what exists in both (the INTERSECTion)
    I made it a little more complicated so you could see in which schema the column is used. You could use exactly the same approach for your questions 1 and 2 also.
    SELECT * FROM
    (SELECT a.column_name,c.constraint_name,'salive' schema_containing
    FROM dba_cons_columns a
    INNER JOIN dba_constraints c ON a.CONSTRAINT_NAME = c.CONSTRAINT_NAME
    WHERE a.owner = 'SALIVE' and c.constraint_type = 'R'
    UNION ALL
    select b.column_name,d.constraint_name,'satest'
    FROM dba_cons_columns b
    INNER JOIN dba_constraints d ON b.CONSTRAINT_NAME = d.CONSTRAINT_NAME
    WHERE d.CONSTRAINT_TYPE='R' AND b.owner = 'SATEST') u
    WHERE NOT EXISTS
    (SELECT *
    FROM
    (SELECT a.column_name,c.constraint_name
    FROM dba_cons_columns a
    INNER JOIN dba_constraints c ON a.CONSTRAINT_NAME = c.CONSTRAINT_NAME
    WHERE a.owner = 'SALIVE' and c.constraint_type = 'R'
    INTERSECT
    select b.column_name,d.constraint_name
    FROM dba_cons_columns b
    INNER JOIN dba_constraints d ON b.CONSTRAINT_NAME = d.CONSTRAINT_NAME
    WHERE d.CONSTRAINT_TYPE='R' AND b.owner = 'SATEST') i
    WHERE u.column_name = i.column_name and u.constraint_name = i.constraint_name)

  • Please help with tricky query

    I need help with SQL query (if it can be accomplished with query at all).
    I'm going to create a table with structure similar to:
    Article_Name varchar2(30), Author_Name varchar2(30), Position varchar2(2). Position field is basicly position of an article author in the author list, e.g. if there is one author, his/her position is 0, if 2, then 1st author is 0, second is 1, etc.
    Article_Name Author_Name Position
    Outer Space Smith 0
    Outer Space Blake 1
    How can I automate creation of Position, based on number of authors on the fly? Let's say I have original table without Position, but I want to create a new table that will have this information.
    Regards

    If you have an existing table whose structure doesn't tell you what position the author is in, what's the algorithm you'd use to determine who was the first author, the second author, etc? If you issue a select query on a table without providing an "order by" clause, Oracle makes no guarantees about the order in which it retrieves rows.
    As an aside, why would you store position number in a varchar2 field? If it's a number, it ought to be stored as a number.
    Justin

  • Please help with the query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, BENEFICIARY_FIRST_NAME,
    BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE,
    LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL,
    ATTENDING_PROVIDER_NUMBER, BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI)
    VALUES
    (SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs,
    :REQUEST_METHOD_IDs, :SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs,
    :SERVICE_LOCATION_STATEs, :BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs,
    :HICNUMs, :CCNs, :CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs,
    :CONTRACTOR_IDs, :PRIORITY_IDs, :UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs,
    :ATTENDING_PROVIDER_NUMBERs, :BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs,
    :STUDY_IDs, :REFERRING_NPIs) RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    You cannot use (and do not want to in this case) the BULK COLLECT.
    create table for_testing
       the_id      number not null primary key,
       some_data   number
    declare
       l_return_value for_testing.the_id%type;
    begin
      4 
       insert into for_testing
          the_id,
          some_data
       values
          1,
          5
       returning the_id into l_return_value;
       dbms_output.put_line('the return values is ' || l_return_value);
    end;
    20  /
    the return values is 1
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?Is a simple example. In the future, please use the tags to preserve formatting on your code like i have so it remains readable .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help : Pipline function, error passing parameter

    Hello,
    Please help a DBA who's trying to make it with PL/SQL (on Oracle 10.2.0.4).
    I'm just building a script to find the space used by all the segments (lob, index, partitions) related to a table.
    Here is my problem, when I call a table function (DBMS_SPACE.OBJECT_DEPENDENT_SEGMENTS) from within a pipeline function i get an error,
    if I turn that function into procedure it is running fine, if I hard code parameters it works...
    When running as a function I get the error :
    SQL> Select * from table(yke_size_info('SAPRD', 'REPOSRC'));
    Select * from table(yke_size_info('SAPRD', 'REPOSRC'))
    *+
    ERROR at line 1:
    ORA-20000: Object does not exist
    ORA-06512: at "SYS.DBMS_SPACE", line 2673
    ORA-06512: at "SYS.YKE_SIZE_INFO", line 40
    => line 40 is the call to DBMS_SPACE.OBJECT_DEPENDENT_SEGMENTS
    Thank for your help, I'm getting crazy with this, I've been browsing Google & docs for hoors but no answer yet !
    create or replace type r_size_info as object (
    nb_par_tbl   number ,
    nb_idx       number ,
    nb_par_idx   number ,
    nb_lob       number ,
    used_par_tbl number ,
    used_idx     number ,
    used_par_idx number ,
    used_lob     number ,
    free_par_tbl number ,
    free_idx     number ,
    free_par_idx number ,
    free_lob     number
    +)+
    +/+
    create or replace type t_size_info as table of r_size_info;
    +/+
    CREATE OR REPLACE FUNCTION yke_size_info(o_wner varchar2, o_bject varchar2 ) RETURN t_size_info PIPELINED AS
    r_size r_size_info := r_size_info(0,0,0,0,0,0,0,0,0,0,0,0);
    obj_segment_owner   VARCHAR2(100);
    obj_segment_name    VARCHAR2(100);
    obj_segment_type    VARCHAR2(100);
    obj_tablespace_name VARCHAR2(100);
    BEGIN
    FOR obj IN (SELECT segment_owner, segment_name, segment_type, tablespace_name FROM TABLE(dbms_space.object_dependent_segments(o_wner, o_bject, NULL, 1)))*
    LOOP
    If I change that line to hard code the parameter It's working :
    FOR obj IN (SELECT segment_owner, segment_name, segment_type, tablespace_name FROM TABLE(dbms_space.object_dependent_segments('SAPSR3', 'REPOSRC', NULL, 1)))
    If I turn the function into a procedure it is working :
    CREATE OR REPLACE PROCEDURE yke_size_inf(o_wner varchar2, o_bject varchar2 ) AS
    obj_segment_owner   VARCHAR2(100);
    obj_segment_name    VARCHAR2(100);
    obj_segment_type    VARCHAR2(100);
    obj_tablespace_name VARCHAR2(100);
    BEGIN
    FOR obj IN (SELECT segment_owner, segment_name, segment_type, tablespace_name  FROM (TABLE(dbms_space.object_dependent_segments (o_wner, o_bject, NULL, 1))))*
    LOOP

    Not really sure what you are trying to achieve... and putting a pipeline function on top of another pipeline function seems unnecessary to me.
    But using the basic code you've shown, the following works fine:
    SQL> create or replace type TStrings is table of varchar2(4000);
      2  /
    Type created.
    SQL>
    SQL> create or replace function FooPipe( objectName varchar2 ) return TStrings pipelined is
      2  begin
      3          for r in (
      4                  select
      5                          segment_owner, segment_name, segment_type, tablespace_name
      6                  from    table( dbms_space.object_dependent_segments(USER, objectName , NULL, 1))
      7          )
      8          loop
      9                  pipe row( r.segment_name||' is object('||r.segment_type||') in space('||r.tablespace_name||')' );
    10          end loop;
    11
    12          return;
    13  end;
    14  /
    Function created.
    SQL>
    SQL> select * from TABLE(FooPipe('TESTTAB'));
    COLUMN_VALUE
    TESTTAB is object(TABLE) in space(USERS)
    SQL>

  • Help about SQL Query

    Hi All,
    I have 3 tables. DEV,APPS,DISC
    DEV Contains data as follows.
    Cardnum    Stat   Flag
    324657      A      GAPPS contains as follows.
    Cardnum Stat balance Product
    324657 A 90 HYG
    3276890 D 0 BNH
    32675 S 89 HGF
    DISC contains
    Cust_Num     Num
    898777          1
    231321          2
    38927          898now I have written SELECT query as follows.
    SELECT c.cardnum, cust_num
      FROM tmp.ccard_gen g,
           tmp.ccard_tmp c,
           ods.phonenr p
    WHERE flag         = 'V'
       AND c.cardnum       = g.cardnum
       AND '32' || p.num   = c.cardnum
       AND c.balancel > 0
       AND c.product = 'SEWING';I don't have product SEWING in DISC and flag 'V'. so I am going to Insert those two values into two tables and then trying to retrieving the records by using above mentioned SELECT Statement.
    But I want to write a single query for Inserting records into those 2 tables and retrieving the records.
    can any one please help me out to writ a query for the issue.
    Thank you,

    You can't insert records with a query. These are two different things.
    What you can do is generate records on the fly
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with myemps as (select empno, ename, sal from emp
      2        union all select 8000, 'FRED', 1000 from dual
      3        union all select 8001, 'BOB', 1200 from dual)
      4  --
      5  select *
      6* from myemps
    SQL> /
         EMPNO ENAME             SAL
          7369 SMITH             800
          7499 ALLEN            1600
          7521 WARD             1250
          7566 JONES            2975
          7654 MARTIN           1250
          7698 BLAKE            2850
          7782 CLARK            2450
          7788 SCOTT            3000
          7839 KING             5000
          7844 TURNER           1500
          7876 ADAMS            1100
          7900 JAMES             950
          7902 FORD             3000
          7934 MILLER           1300
          8000 FRED             1000
          8001 BOB              1200
    16 rows selected.
    SQL>

  • Please help---merge function for two arrays.

    I am trying to create a merge function that merges two sorted arrays into a third array. I know what I am supposed to do, at least in theory, but I have been completely unsuccessful with actually getting the code to work. Since it is private, you can't directly access the arrays, you have to just reference them. could someone please help me out.
    import java.io.*;
    class OrdArray
    private long[] a;
    private int nElms;
    public OrdArray(int max)
    a = new long[max];
    nElms = 0;
    public int size()
    { return nElms;}
    public int find(long searchKey)
    int lowerBound = 0;
    int upperBound = nElms-1;
    int curIn;
    while(true)
    curIn = (lowerBound + upperBound) / 2;
    if(a[curIn]==searchKey)
    return curIn;
    else if (lowerBound > upperBound)
    return nElms;
    else
    if(a[curIn] < searchKey)
    lowerBound = curIn + 1;
    else
    upperBound = curIn - 1;
    public void insert(long value)
    int j;
    for(j=0; j<nElms; j++)
    if(a[j] > value)
    break;
    for(int k=nElms; k>j; k--)
    a[k] = a[k-1];
    a[j] = value;
    nElms++;
    public boolean delete(long value)
    int j = find(value);
    if(j==nElms)
    return false;
    else
    for(int k=j; k<nElms; k++)
    a[k] = a[k+1];
    nElms--;
    return true;
    public void display()
    for(int j=0; j<nElms; j++)
    System.out.print(a[j] + " ");
    System.out.println("");
    public void merge(OrdArray array, OrdArray array1)
    }//this is the start of the merge function. I am stuck and not real sure where to go from here.
    public long getElm(int index)
    return a[index];
    }//end class OrdArray
    class OrderedApp
    public static void main(String[]args)
    int maxSize = 100;
    OrdArray arr, arr1, arr2;
    arr = new OrdArray(maxSize);
    arr1 = new OrdArray(maxSize);
    arr2 = new OrdArray(maxSize);
    arr.insert(77);
    arr.insert(99);
    arr.insert(44);
    arr.insert(55);
    arr.insert(22);
    arr1.insert(88);
    arr1.insert(11);
    arr1.insert(00);
    arr1.insert(66);
    arr1.insert(33);
    arr2.merge(arr, arr1);
    arr.display();
    System.out.println("--------------------");
    arr1.display();
    System.out.println("--------------------");
    arr2.display();
    }

    If I use ArrayList<Long>, would I have to change private long[]a to ArrayList<long>, cause if so, I am not able to do that.
    I am supposed to add a merge() method to megre the two source arrays into an ordered destination array.
    public void merge(OrdArray array, OrdArray array1)
    mergeSize = array.nElems + array1.nElems;
    int i = 0;
    int j = 0;
    int k = 0;
    while (i = 0; i < array.nElems; i++) {
              if {array.getElm(i) < array1.getElm(j)
                                                              //how do you move to the next set of values
                                                              //and to move which variables are incremented
                                                              //how do you test if the flush loop should be      called, hint if( == )
                   while (j = mergeSize - array.nElems; j <= mergeSize; j++) { 
                                   this.a[j] = array1.a;
    //again how do you move to next value and placeholder
         //which indices are incremented
    //copy/paste and change the variables for the other value being smaller
    public long getElm(int index)
    return a[index];
    this is all I have started, but i don't really understand all the comments because I haven't used java in a long time. Like I said, I understand what needs to be done and what order to do it in, but getting the code down to do that is really rough

  • Please Help regard function that will return values of each JComboBox items

    I'd like to create a function that will return values of each item on the JComboBox at a time when
    I click on each item of a comboBox. I had this following codes, but didn't work.
    Please help me !!!Please correct it... thanks a million
    String wp;
    String text;
    String A[] = {"WARNIGNS","CAUTIONS","NOTES"};
    JComboBox ABC = new JComboBox();
    for (int i=0;i<A.length;i++) {
    ABC.addItem (A);
    text = Get_It(); //assigns each value of JComboBox's item to variable text when clicks at each item
    //of a comboBOx
    private String Get_It(){
    ABC.addActionListener(new ActionListener (){
    public void actionPerformed(ActionEvent e){
    wp = (String)CBweapon.getSelectedItem() ;
    return wp;

    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    public class AlertFrame extends JFrame {
    String s_alert[] ={"WARNIGNS","CAUTIONS","NOTES"};
    JComboBox CBweapon;
    String wpText;
    public AlertFrame() {
    super("Alerts");
    Container contentPane = getContentPane();
    contentPane.setLayout(null);
    setSize(600,600);
    CBweapon = new JComboBox();
    for (int i=0;i<s_weapon.length;i++) {
    CBweapon.addItem (s_weapon);
    contentPane.add(CBweapon);
    CBweapon.setActionCommand("");
    //set position for components
    CBweapon.setBounds(370 + insets.left,295+ insets.top, 150,30);
    System.out.println(getit()); //calling getit() function
    //this function will be return a String of JcomboBOx value if click on each item of combobox
    private String getit(){
    CBweapon.addActionListener( new ActionListener (){
    public void actionPerformed(ActionEvent e){
    wpText = (String)CBweapon.getSelectedItem() ;
    return wpText;
    public static void main(String args[]) {
    AlertFrame af = new AlertFrame();
    af.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    **I have no errors on compile or run, but it didn't return a string value to System.out.println(getit());
    It maybe because of the "void" of public void actionPerformed(ActionEvent e){
    wpText = (String)CBweapon.getSelectedItem() ;
    Please help me

  • Please help me in Query result.

    Hello Friends..
    Need some help .
    I have refreshed one workbook for one sales document , and it is showing me all the data.
    Could you please tell me how can i check all the key figure value , because in Query properties it is restricted to 0.
    Means , if all the Key figure value are 0 , then it will not show that Row in Report .
    I want to see the result of 0 value as well with out changing Query properties.
    Please help me and advice me , how can i do this.
    Regards

    Hi Jain,
    Without changing the query properties it will not be possible to view all values.
    If you want to view with changing the properties of query.
    Youcan do the following steps
    select each attributes right click >restrict->bring back the restricted value->and execute the query.
    all the rows will be dispalyed
    Hope this helps
    Cheers
    Sunil

Maybe you are looking for

  • Fileaccess.httpUploadBean doesn't upload file in Jdevelper 9.0.3

    Hi, I am using Jdevelper 9.0.3 to develop a jsp Based File Upload Utility. I have attached Liberary "JSP RUNTIME" which reffers to "ojsp.jar","ojsputil.jar","oc4j.jar","servlet.jar","ojc.jar". while running the code for file upload, file doesn't get

  • Wipe Hard Drive clean install of Window Server

    What is the best way to wipe Hard Drive? Save a partition for later use and use remaining partition to install Sever OS, save to external drive(to use later) and wipe completely(cleanest install, I believe), complete wipe completely not worrying abou

  • Ipod with video use firewire ?

    I have just got an Ipod with with video and wondered if I could use firewire instead. My old Imac G4 only has usb 1.0 and is too slow and the ipod doesn't seem to update or just makes Itunes hang while copying a song across. Any answers would be help

  • Why is iPhoto asking for keychain access to confidential Facebook "something"??

    I've recently upgraded to Lion and the newest iPhoto '11 and I keep getting a pop-up from iPhoto "iPhoto wants access confidential keychain (something) with api.Facebook" or something like that. What is this? Does anyone else have information about w

  • ALV Display on the Custom Control

    Hi Friends, Iam developing a Module Pool program where I call a ALV grid on a custom control. I have only one screen in which i have a input field and a custom control. when I enter a material number in the input field and press ENTER the custom cont