Urgent help in query

i have a table having business_name,sales,SIC the data is shown below
business_name sales sic
xxx 30 1300
yyy 45.5 2000
zzz 65 8769
i need to generate a report the number of business having sales between 0-50 and
sic between 000-3000 and 3000-5000 and 5000-7000...
like sales between 50-100 and having sic 000-3000 ,3000-5000...
how to write this in query. could anybody please help me.
0000-3000 3000-5000 5000-7000
0-50
50-100
100-150

i have a table having columns businessname,sales in millions and sic code.
sic code ranges from 0000-9999
i want to generate a report that how many businesses having a sales between
0-50 and sic between0000-3000, and no of businesses having sales between
0-50 and sic between 3000-5000 ,and sales0-50 and sic 5000-7000 son on
and also
Businesses have sales 50-100 and sic 0000-3000,3000-5000....
the report should be like this
SIC
0000-3000 3000-5000 5000-7000
SALES
0-50 2 3 5
50-100 9 1 8
100-150 0 18 2

Similar Messages

  • Urgent help required: Query regarding LC Variables

    Hi All
    Sometime earlier I was working on a performance issue raised by a customer. It was shell script that was taking almost 8-9 hrs to complete. During my research I came across a fact that there were some variables which were not set, the LC variables were impacting the sort funnel operations because of which the script was taking a long time to execute.
    I asked them to export the following commands, after which the program went on smoothly and finished in a couple of mins:
    export LC_COLLATE=en_US.ISO8859-1
    export LC_MESSAGES=C
    export LC_MONETARY=en_US.ISO8859-1
    export LC_MONETARY=en_US.ISO8859-1
    export HZ=100
    export LC_CTYPE=en_US.ISO8859-1
    export LANG=en_US.UTF-8
    Later I did recover that setting the LC_COLLATE to C, is not helping and the program was again taking a lot of time. Few questions that I want to ask are:
    1. Can someone please tell me, what each of these variable mean and how these values make a difference.
    2. When I exported LC_COLLATE=en_US.ISO8859-1, it worked fine, but when i tried with the defalut value LC_COLLATE=C, then why the program didnt work.
    As this issue is still going on, hence I would request All to provide their valuable inputs and let me know as much as possible.
    Appreciate your help in this regard.
    Thanks
    Amit
    Hi All
    A new development in this regard. The customer has send us a screen shot in which they were trying to export the locale variable using the commands which I have pasted above. I can see in the screen shot that while exporting LC_COLLATE and LC_TYPE, they get a message that ""ksh: export: couldn't set locale correctly"".
    Request everyone to please give their inputs as it's a bit urgent.
    Thanks for all the help in advance.
    Thanks
    Amit
    Some help required please...
    Edited by: amitsinhaengg on Jul 22, 2009 2:03 AM
    Edited by: amitsinhaengg on Jul 22, 2009 2:06 AM

    LC_CTYPE
    Controls the behavior of character handling functions.
    LC_TIME
    Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.
    LC_MONETARY
    Specifies monetary formats, including the currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.
    LC_NUMERIC
    Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.
    LC_COLLATE
    Specifies a collation order and regular expression definition for the locale.
    LC_MESSAGES
    Specifies the language in which the localized messages are written, and affirmative and negative responses of the locale (yes and no strings and expressions).
    You can use command
    # locale -k LC_CTYPE
    to see more detail about each type.

  • Need urgent help with query....

    i need to print loc field with it but the logic is get ti loc code where the month is maximum...
    Need output like this
    K  Loc            M_1        M_2        M_3        M_4        M_5        M_6
    A   1     2.5        4.5          0          0          0          0
    B   4        0          0          0          0        2.5          0
    C  3       2.5        2.5        2.5        2.5        2.5        2.5
    drop table y;
    create table y( key char(1),
              loc number,
              month char(2),
              amnt number);
    insert into y values('A',2,'01',2.50);
    insert into y values('A',1,'02',4.50);
    insert into y values('B',4,'05',2.50);
    insert into y values('C',2,'01',2.50);
    insert into y values('C',8,'02',2.50);
    insert into y values('C',3,'03',2.50);
    insert into y values('C',3,'04',2.50);
    insert into y values('C',3,'05',2.50);
    insert into y values('C',3,'06',2.50);
    commit ;
    select key
    ,sum(decode(month,'01',amnt,0)) m_1
    ,sum(decode(month,'02',amnt,0)) m_2
    ,sum(decode(month,'03',amnt,0)) m_3
    ,sum(decode(month,'04',amnt,0)) m_4
    ,sum(decode(month,'05',amnt,0)) m_5
    ,sum(decode(month,'06',amnt,0)) m_6
    from y
    group by key;
    SQL> select key
      2  ,sum(decode(month,'01',amnt,0)) m_1
      3  ,sum(decode(month,'02',amnt,0)) m_2
      4  ,sum(decode(month,'03',amnt,0)) m_3
      5  ,sum(decode(month,'04',amnt,0)) m_4
      6  ,sum(decode(month,'05',amnt,0)) m_5
      7  ,sum(decode(month,'06',amnt,0)) m_6
      8  from y
      9  group by key;
    K        M_1        M_2        M_3        M_4        M_5        M_6
    A        2.5        4.5          0          0          0          0
    B          0          0          0          0        2.5          0
    C        2.5        2.5        2.5        2.5        2.5        2.5

    Well, maybe I'm lucky to understand here ?
    SQL> select
    2   key
    3  ,max(loc) keep (dense_rank last order by
    amnt,month) loc
    4  ,sum(decode(month,'01',amnt,0)) m_1
    5  ,sum(decode(month,'02',amnt,0)) m_2
    6  ,sum(decode(month,'03',amnt,0)) m_3
    7  ,sum(decode(month,'04',amnt,0)) m_4
    8  ,sum(decode(month,'05',amnt,0)) m_5
    9  ,sum(decode(month,'06',amnt,0)) m_6
    10  from y
    11  group by key;
    K        LOC        M_1        M_2        M_3
    M_4        M_5        M_6
    A          1        2,5        4,5          0
    0          0          0
    4          0          0          0          0
    2,5          0
    3        2,5        2,5        2,5        2,5
    2,5        2,5Nicolas.
    This should be more a question for SQL and PL/SQL
    Forum :
    PL/SQL
    start=0
    Message was edited by:
    N. GasparottoPerfect..... many thanks... and i am sorry i put this in this forum rather than in SQL/PLSQL... but you are the best!!
    thanks to all of you..

  • Urgent help on SAP BW3.5 GST Query Changes

    Dear Experts,
    Need your urgent help in modifying a query.
    Requirement: The Query has two different hierarchy node structures in 1 hierarchy itself.
    This hierarchy is used in report where we can now see 2 different node structures added, for which the calculation of Rate is different for one node and different for another.
    Rate = Tax/ GST Val * 100 for first node
    Rate = (GST Val /(GST Gross - GST Val)) * 100 for another node.
    The differentiating factor for these two nodes is Tax Code which is a char value.
    This rate value couldnt been calculated at Report level for the reason being that all others the Key figures except Tax Code which is a char and hence couldnt put any formula there.
    We tried calculating the Rate at Cube lebel itself by creating another Key figure and written a 'field level routine' to it, it is working good and showing the right values at cube level, where the data is stored at Line item level.
    Now the challenge is that in report, as we execute them at aggregated levels the value for Rate is being cumulated (added) and shown which is wrong.
    Eg:                 Account  LineItemNo  Input Tax Credit                            GST   GST Rate
         123     1     10              10     100
         123     2     20              20     100
    In Report when we look at these figures it appears at say Account level then it is appearing as :
    Account   Input Tax Credit  GST   GST Rate
    123     30        30      200 (Instead of 100 as expected).
    Can anyone help us to resolve this, this is of top most priority to us.
    We are not using any WAD and system is BW 3.5.
    Please suggest if WAD can help us in this.
    Kind Regards,
    RJ

    Hi Gerrit Schang,
    Thanks for your instant reponse, appreciate it.
    But as this is BW3.5 system, the option for Exception Aggregation selection as  "no aggregation along the hierarchy" is not available in dropdown.
    But there is one option as 'No aggregation (X, if more than one record occurs)' below which there is an option to chose the Agg.ref.char on which this aggregation should be checked.
    Can I use this option and select ' Account Number' as the Agg.ref.char to solve my problem?
    or you have any other solution, please suggest.
    Kind Regards,
    RJ

  • Urgent help needed in achieving below ADF 11g flow

    Hi, I am using JDEV 11.1.1.2.0 with ADF 11g.
    I have a below requirement.
    Say in below eg. I am getting col1, col2, col3 from a single tbl in screen 1. On clicking col1's row I should go to screen 2
    Screen1
    Col1     Col2     Col3
    Nm1     Code1     10
    Nm1     Code1     30
    Nm2     Code1     30
    Nm1     Code2     20
    Here in screen 2 I will have a calculated field as shown below. Besides this In the same screen I will have a list showing distinct of col2 for the value cliked in col1. So here in this eg. it will be for Nm1 I will have 2 values in the list Code1 and Code2.      
    Screen 2          
    Col1     Nm1     
    Col2     Code1     
    Tot     *40*     
    Col2     Select     
    Code1     X     
    Code2          
    Now here if user selects the radio of 'Code2' Then my above data should change as below
    Col1     Nm1     
    Col2     Code2     
    Tot     *20*
    Col2     Select     
    Code1          
    Code2     X
    I do this by passing the col1 value as a param to a query VO.
    I have tried this using different VOs like a VO with query, VO with user defined column... nothing helps.
    I am just unable to reach to screen 2. I am either getting invalid column OR missing in out parameters.
    Can any one help on how and what should be done? This is not even master-details stuff. master-details seems easier than this.
    Urgent help is needed.
    Thanks in advance

    I have resolved your problem and build a sample application.
    You have to create 2 views and use master detail.
    First view will be a simple view for the page 1 and second view will be readonly using group by. Then create a view link between them.
    Let me know your email id. I will email you the sample application.
    SID
    Edited by: manieshsailoz on Apr 26, 2010 5:12 PM

  • R12 AR Invoice raxinv  -Customization (add columns) - need urgent help

    Hi,
    I need urgent help in customization of AR invoice report (raxinv) in R12. I am doing report customization for Brazil. As soon as I add one more column in report common query, build query and main query Q_invoice. Report changes to new variables in report editor q_invoice itself for example from remit_to_address_id to remit_to_address_id1 , previous_customer_id to previous_customer_id1 and start giving error that original variables e.g. remit_to_address_id , previous_customer_id are not defined in the query. Variable names and xml tags are also different from each other. even after trying to fix it, error persist.
    Thanks
    Anju

    Hi,
    I need urgent help in customization of AR invoice report (raxinv) in R12. I am doing report customization for Brazil. As soon as I add one more column in report common query, build query and main query Q_invoice. Report changes to new variables in report editor q_invoice itself for example from remit_to_address_id to remit_to_address_id1 , previous_customer_id to previous_customer_id1 and start giving error that original variables e.g. remit_to_address_id , previous_customer_id are not defined in the query. Variable names and xml tags are also different from each other. even after trying to fix it, error persist.
    Thanks
    Anju

  • Your urgent help will be very much appreciated

    I have a problem whenever I connect my database and need your urgent help. the sample source code is below
    import java.sql.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class Table extends JFrame
    private Connection con;
    private JTable table;
    public Table()
         String url = "jdbc:odbc:Books";
         String username="";
         String password="";
         try{
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         con = DriverManager.getConnection(url, username, password);
         catch(ClassNotFoundException cnfex)
         System.err.println("Failed to load JDBC/ODBC driver.");
         cnfex.printStackTrace();
         System.exit(1);
         catch(SQLException sqlex)
         System.err.println("Failed to connect");
         sqlex.printStackTrace();
         getTable();
         setSize(45,150);
         show();
    public void getTable()
         Statement state;
         ResultSet result;
         try{
         String query="Select * from Author";
         state=con.createStatement();
         result=state.executeQuery(query);
         displayResult(result);
         state.close();
         catch(SQLException sqlex)
         sqlex.printStackTrace();
    public void displayResult(ResultSet rs)throws SQLException
    boolean moreRecord=rs.next();
    if (!moreRecord)
    JOptionPane.showMessageDialog(this, "ResultSet contained no record");
    setTitle("No records to display");
    return;
    setTitle("Author table from Books");
    Vector columnHeads=new Vector();
    Vector rows=new Vector();
    try{
    ResultSetMetaData rsmd=rs.getMetaData();
    for (int i=1; i<=rsmd.getColumnCount(); i++)
    columnHeads.addElement(rsmd.getColumnName(i));
    do{
    rows.addElement(getNextRow(rs, rsmd));
    }while(rs.next());
    table=new JTable(rows, columnHeads);
    JScrollPane scroller=new JScrollPane(table);
    getContentPane().add(scroller,BorderLayout.CENTER);
    validate();
    catch(SQLException sqlex)
    sqlex.printStackTrace();
    public Vector getNextRow(ResultSet rs, ResultSetMetaData rsmd)
              throws SQLException
    Vector currentRow=new Vector();
    for (int i=1; i<=rsmd.getColumnCount(); i++)
    switch (rsmd.getColumnType(i))
    case Types.VARCHAR:
         currentRow.addElement(rs.getString(i));
         break;
         case Types.INTEGER:
         currentRow.addElement(new Long(rs.getLong(i)));
         break;
    default:
    System.out.println("Type was: "+rsmd.getColumnTypeName(i));
    return currentRow;
    public void shutDown()
         try{
         con.close();
         catch(SQLException sqlex)
         System.err.println("Unable to disconnect");
         sqlex.printStackTrace();
    public static void main(String args[])
         final Table app=new Table();
         app.addWindowListener( new WindowAdapter()
         public void windowClosing(WindowEvent e)
              app.shutDown();
              System.exit(0);

    Thank you for your help. When I compile it, it is fine, the problem happens when run it.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6d448d54
    Function name=(N/A)
    Library=C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\hotspot\jvm.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at sun.jdbc.odbc.JdbcOdbc.driverConnect(Native Method)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Table.<init>(Table.java:26)
    at Table.main(Table.java:145)
    Dynamic libraries:
    0x00400000 - 0x00405000 C:\WINNT\system32\java.exe
    0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
    0x77D90000 - 0x77DED000 C:\WINNT\system32\ADVAPI32.dll
    0x77E60000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
    0x786F0000 - 0x78761000 C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
    0x60000000 - 0x6003A000 c:\program files\rising\rav\ApiHook.dll
    0x05000000 - 0x0502E000 c:\program files\rising\rav\MemMon.dll
    0x77DF0000 - 0x77E55000 C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
    0x75E00000 - 0x75E1A000 C:\WINNT\System32\IMM32.DLL
    0x6D420000 - 0x6D4F7000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\hotsp
    ot\jvm.dll
    0x77530000 - 0x77560000 C:\WINNT\system32\WINMM.dll
    0x6D220000 - 0x6D227000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\hpi.d
    ll
    0x6D3B0000 - 0x6D3BD000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\verif
    y.dll
    0x6D250000 - 0x6D266000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\java.
    dll
    0x6D3C0000 - 0x6D3CD000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\zip.d
    ll
    0x6D020000 - 0x6D12A000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\awt.d
    ll
    0x777C0000 - 0x777DE000 C:\WINNT\system32\WINSPOOL.DRV
    0x75010000 - 0x75020000 C:\WINNT\system32\MPR.DLL
    0x77A30000 - 0x77B25000 C:\WINNT\system32\ole32.dll
    0x6D1E0000 - 0x6D21B000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\fontm
    anager.dll
    0x6DD30000 - 0x6DD36000 C:\WINNT\System32\INDICDLL.dll
    0x37210000 - 0x3723D000 C:\WINNT\DOWNLO~1\CnsMin.dll
    0x77C50000 - 0x77C9A000 C:\WINNT\system32\SHLWAPI.dll
    0x777E0000 - 0x777E7000 C:\WINNT\system32\VERSION.dll
    0x75950000 - 0x75956000 C:\WINNT\system32\LZ32.DLL
    0x6D290000 - 0x6D29A000 C:\Program Files\JavaSoft\JRE\1.3.1_05\bin\JdbcO
    dbc.dll
    0x1F7F0000 - 0x1F825000 C:\WINNT\system32\ODBC32.dll
    0x76AF0000 - 0x76B2D000 C:\WINNT\system32\comdlg32.dll
    0x77B30000 - 0x77BB9000 C:\WINNT\system32\COMCTL32.DLL
    0x78F90000 - 0x791D6000 C:\WINNT\system32\SHELL32.DLL
    0x1F8E0000 - 0x1F8F6000 C:\WINNT\system32\odbcint.dll
    0x77900000 - 0x77923000 C:\WINNT\system32\imagehlp.dll
    0x72960000 - 0x7298D000 C:\WINNT\system32\DBGHELP.dll
    0x687E0000 - 0x687EB000 C:\WINNT\system32\PSAPI.DLL
    Local Time = Tue Feb 25 21:33:38 2003
    Elapsed Time = 7
    # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
    # Error ID : 4F530E43505002BD
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.3.1_05-b02 mixed mode)
    # An error report file has been saved as hs_err_pid1792.log.
    # Please refer to the file for further information.
    #

  • Urgent Help with network access to FileOutputStream

    URGENT HELP NEEDED GUYS...I am stuck on this past 2 days. I tried several alternatives but to vain.
    I am trying to access a Folder on a user's computer which is lying in a different Domain.
    For accessing this folder, I have the following information with me.
    Domain name, PC name, folder name, windows username, windows password.
    Note: This username and password will give me rights to read + write to that folder.
    How to use these information to open a fileoutputstream ? Does the java.io package allow programs to pass a username, password , domainname, pcname and then the folder and filename to create/read/write files..
    Pls. suggest code examples. Sometime back I posted this query but didnt get an answer to my satisfaction. I have tried at my end but unsuccessful yet. Help would be appreciated.
    I am trying this on a Windows File System and Network domain
    THIS IS V. URGENT
    Thanks,

    Hi HJK,
    I am referring to the last reply of yours.
    " Hi, there are three approaches I can think of offhand:
    1) make sure the user-context under which you run the java app has the right to access the remote drive.
    2) Do the network connection in a batch or c program and call that at the start of your java app with Runtime#exec.
    3) Write some c/c++ code to open the connection and integrate that via JNI.
    Let me know what (other) solution you came up with in the end!
    Regarding the 1st.
    I am supposed to write a remote installation utility actually. There are around 200 PC(s) in a network on which I need to copy these java class files. My problem statement is such that at runtime I only have username, passwords, domain access. I am not supposed to map any drives. Its supposed to be done dynamically. No manual intervention required. :(
    How do I do the network connection in a batch mode ? Let me know that?
    If 2nd option can be done, probably I can think of action-3 at the moment I am quite blurr :(

  • Implementation Restriction 'DBMS_LOB.READWRITE'  Urgent Help

    *"Implementation Restriction 'DBMS_LOB.READWRITE' Cannot directly access remote package variable or cursor"*
    Hello,
    I need urgent help in implementing DBMS_LOB package.
    I need to write data in LOB object using DBMS_LOB object
    following code is written in PRE-UPDATE Trigger for the block CTX
    on the form i have taken Clob_Desc_f as non database field of type CHAR(26000)
    After querying the data I change Clob_Desc_f and enter the new data when saved it shoud empty the lob field based on the key value with empty lob
    and then write the data into lob
    DECLARE
    w_Description_Clob CLOB;
    BEGIN
    Here Clob_Desc is the lob field in table cxt
    UPDATE Cxt
    SET Clob_Desc = Empty_Clob()
    WHERE Cxt.Key_Field = :Cxt.Key_Field RETURNING Clob_Desc INTO
    w_Description_Clob;
    Dbms_Lob.OPEN(w_Description_Clob, Dbms_Lob.Lob_Readwrite);
    Dbms_Lob.WRITE(w_Description_Clob
    ,Length(:Cxt.Clob_Desc_f)
    ,1
    ,:Cxt.Clob_Desc_f
    Dbms_Lob.CLOSE(w_Description_Clob);
    END;
    The above code gives error saying
    *1] RETURNING clause is not supported in client-side program.*
    *2] For the statement*
    Dbms_Lob.OPEN(w_Description_Clob, Dbms_Lob.Lob_Readwrite);
    gives error as " Implementation Restriction Dbms_Lob.Lob_Readwrite : Cannot directly access remote package variable."
    How can I use Dbms_Lob.OPEN
    Thanks in advance.
    Regards,
    Sourabh

    Hello,
    Here is the constants you can use directly:
    * file_readonly CONSTANT BINARY_INTEGER := 0;
    * lob_readonly CONSTANT BINARY_INTEGER := 0;
    * lob_readwrite CONSTANT BINARY_INTEGER := 1;
    * lobmaxsize CONSTANT INTEGER := 4294967295;
    * call CONSTANT PLS_INTEGER := 12;
    * session CONSTANT PLS_INTEGER := 10;
    * warn_inconvertible_char CONSTANT INTEGER := 1;
    * default_csid CONSTANT INTEGER := 0;
    * default_lang_ctx CONSTANT INTEGER := 0;
    * no_warning CONSTANT INTEGER := 0;
    10g
    * file_readonly CONSTANT BINARY_INTEGER := 0;
    * lob_readonly CONSTANT BINARY_INTEGER := 0;
    * lob_readwrite CONSTANT BINARY_INTEGER := 1;
    * lobmaxsize CONSTANT INTEGER := 18446744073709551615;
    * call CONSTANT PLS_INTEGER := 12;
    * session CONSTANT PLS_INTEGER := 10;
    * warn_inconvertible_char CONSTANT INTEGER := 1;
    * default_csid CONSTANT INTEGER := 0;
    * default_lang_ctx CONSTANT INTEGER := 0;
    * no_warning CONSTANT INTEGER := 0;
    Francois

  • Urgent help!!  how to cal Good will in HFM?

    Hi Professionals,
    I need urgent help from you. I would like to know how to calculate Good will % from ownership.
    I dint work on tht before. And i posted this query before but dint not get any answer.
    Thanks in Advance
    Edited by: 897162 on Nov 27, 2011 1:56 AM

    Hi
    I found a thread in this forum on "Ownership calculation" which also talking about the good will calculation.
    Ultimate Ownership calculation in HFM
    This could give some idea.
    thank you
    Regards,
    Mahe

  • URGENT HELP ON BMP CMP!!!

    Hi everybody!!
    I've wrote few CMP EJB's before and now Im trying to write a BMP EJB.
    In the finder methods I�ve to select data from two tables:
    "product_catalog" and "product" (relation One to many)
    The query that matches my needs is:
    SELECT DISTINCT a.product_code, b.product_description
    FROM product a, product_catalog b
    WHERE a.product_code = b.product_code
    AND (a.region_code = '00' OR a.region_code = 'variable argument')
    AND b.product_line <> '08'
    Note that in the FROM clause of the query data is retrieved from two tables and that the WHERE conditions involve both tables.
    �A query like this can be implemented into a finder method of a BMP EJB?
    �What about the descriptor? -Im using Websphere Application Server 4.0-
    �How can I tell the container which fields will be persistent?
    �Which fields should I've to specify as primary key fields? �The ones from the parent table? �What about the ones from the child table? �What about the query in the ejbLod() and the ejbStore() methods that select and update data from the table(s)?
    I've looked at the J2EE tutorial examples but none of the examples uses a query like mine.
    As you can see I need URGENT help on this.
    All the help you can give will be greatfully welcome!!
    THANKS!!!
    Ezequiel Velazquez

    Greetings,
    Note that in the FROM clause of the query data is
    retrieved from two tables and that the WHERE
    conditions involve both tables.IOW: an "inner join"...
    �A query like this can be implemented into a finder
    method of a BMP EJB?BMP differs from CMP in that as the bean coder: you are in control of the query and therefore can be as simple or as complex as required without required to the container's query language support. However, remember the implementation rules of finder methods:
    1. A finder method's purpose is simply to locate entities in the resource; and, therefore...
    2. A finder method returns an instance of the PrimaryKey class (or collection thereof).
    Also...
    a. The container calls a corresponding ejbFind method on an instance in the free pool; and, therefore...
    b. A finder method should not attempt to manipulate bean state.
    Therefore, as long as the data returned by your join query (a.product_code, b.product_description), compose a PrimaryKey class instance, you are fine.
    However, I will add that it should be remembered that an EBs purpose is to provide an OO representation of shareable, persistent, data ("entities") in an enterprise resource. They have a specific purpose and do not merely provide "data access" or act as "resource managers". From your example given, it seems your "entity" may be uniquely identified from 'a.product_code', a common primary(?) key in both tables and that the code is actually trying to act as a report writer. If your SELECTed data (a.product_code, b.product_description) do not together comprise a unique entity representation in your application then this is incorrect usage. In this case you should either generate the query from a Session Bean or create separate Entity Beans for each of your tables 'a' and 'b' and handle your 'joins' in business methods.
    �What about the descriptor? -Im using Websphere
    Application Server 4.0-Your descriptor will identify the bean's <persistence-type> as "Bean". This is all it needs to know about the bean since the Bean is Manag[ing] it's own Persistence (BMP ;).
    �How can I tell the container which fields will be
    persistent?Er, you don't. BMP beans manage their own persistence and, therefore, manage their own fields. Refer again to the above.
    �Which fields should I've to specify as primary key
    fields? �The ones from the parent table? �What about
    the ones from the child table? �What about the query
    in the ejbLod() and the ejbStore() methods that select
    and update data from the table(s)?These are all questions related to how your application requires an "OO representation of its resource data" to be mapped to the backend resource(s). Only "you" can really answer these questions. However, refer back to the above for some implicit pointers. :)
    I've looked at the J2EE tutorial examples but none of
    the examples uses a query like mine.The tutorial is intended for beginners to J2EE development and, therefore, provide only simplistic examples. For a more thorough examination, refer to the J2EE Blueprints.
    As you can see I need URGENT help on this.
    All the help you can give will be greatfully
    welcome!!I hope this helps.
    THANKS!!!
    Ezequiel VelazquezRegards,
    Tony "Vee Schade" Cook

  • URGENT HELP ON BMP EJB!!!

    Hi everybody!!
    I've wrote few CMP EJB's before and now Im trying to write a BMP EJB.
    In the finder methods I�ve to select data from two tables:
    "product_catalog" and "product" (relation One to many)
    The query that matches my needs is:
    SELECT DISTINCT a.product_code, b.product_description
    FROM product a, product_catalog b
    WHERE a.product_code = b.product_code
    AND (a.region_code = '00' OR a.region_code = 'variable argument')
    AND b.product_line <> '08'
    Note that in the FROM clause of the query data is retrieved from two tables and that the WHERE conditions involve both tables.
    �A query like this can be implemented into a finder method of a BMP EJB?
    �What about the descriptor? -Im using Websphere Application Server 4.0-
    �How can I tell the container which fields will be persistent?
    �Which fields should I've to specify as primary key fields? �The ones from the parent table? �What about the ones from the child table? �What about the query in the ejbLod() and the ejbStore() methods that select and update data from the table(s)?
    I've looked at the J2EE tutorial examples but none of the examples uses a query like mine.
    As you can see I need URGENT help on this.
    All the help you can give will be greatfully welcome!!
    THANKS!!!
    Ezequiel Velazquez

    post the same question at:
    http://forum.java.sun.com/forum.jsp?forum=13

  • Sqlplus SPOOL broken.  Urgent help.

    I have never seen this before.
    I am running a spool of a small query. It returns 7 rows and they are displayed. I go to look at the .lst file and the first row is gone from the spooled .lst file. I have tried this multiple times, and the results vary- sometimes it removes the first row and sometimes it removes the first column of data form the first row.
    ??????????????? Any idea where to start looking for trouble other than the alert.log?

    > Urgent help.
    My usual soapbox response (again).
    Please do not call your problem urgent. Why?
    Because you are saying that your problem is more important and more deserving attention than other people who post problems here. That is just a rude and arrogant thing to do. Your problem is by no means more important than any other person's problem in this forum - as you are in no position to compare and judge that.
    You are also demanding a quick response from those here that assist people like you. You have no right to demand anything as paid professionals are giving you their free time in assisting you. How can you claim that they must be "quick-quick" in spending their free time, without any payment, to assist you?
    So, practice some netiquette and remember that this is a PUBLIC forum and "staffed" by volunteers.

  • Urgent help on export backup

    Hii all,
    I have
    oracle db : 10.2.0.3
    backup : exp backup (9i)
    i have 9i export backup of full database backup. Now i need to import on the other database.
    For this do i need to create respective tablespaces? or import will directly create the tablespaces? it import will create then where i need to make the changes of the datafile names?
    Urgent help is needed friends!!!
    Thank you.

    hi anand,
    i have a query...while import i get the errors in the log stating that the sysman and system object already exists....can i exclude these schemata while importing?
    or is there any other way to get rid of such errors in the log file?
    Thanks

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

Maybe you are looking for

  • Question about CEP Naming Conventions and or Standards

    Hello, CEP is new to the organization that I am working with. I have been asked to draft a few standards around CEP to help promote standardization and proper reuse of CEP artifacts. Can anyone share with me examples of CEP artifacts with a naming co

  • IPod problems from ****

    Okay, here goes. I tried to connect my Fifth Generation iPod to my Windows PC with the latest iTunes installed this morning. It said that it couldn't read my ipod and then my computer crashed. I manually restarted the ipod because it was frozen. Now,

  • Same file - changed security settings

    I have created a pdf from word2010. If I view security settings in Reader 9 it says Commenting: Not allowed. If I open the same file on another machine but using Reader X (v 10.1.2) is it says Commenting: Allowed. Any ideas why?

  • IPhone calls from my Mac

    I have an iPhone 5 running 8.1.2 and my Mac is running Yosemite. I also have an iPad Mini running 8.1.2. I think all of my settings are correct across all three devices and phone calls to my iPhone are appropriately being forwarded to my iPad. When I

  • Fireworks CS3 hangs on opening

    Since a couple of days ago when I start Fireworks CS3 it gets hanged for some minutes. On the application title appears "Not responding". If I wait for some minutes it wakes up and then works normally. I things this is related to the update intalled