How can I get required result

How can I get bellow result...
For row 1 in Table X: There should be one row in result table.
For row 2 in Table X: These should be 2 rows one for each package code
For rows 3 and 4: The X table should be joined with Table Y and create the # of rows depending on the # of Section codes that are in the range of B01M-U01M and B04F-U04F. These are just some sample rows, they code be several rows with the above scenarios in those tables.
Table X
Grp_#
Grp_Name
Package num
Product #
111
aaa
123
PPO
222
bbb
002, 007
EPO
333
ccc
108-B01M-U01M
CMM
444
ddd
008, 128-B04F-U04F
PPO
Table Y
ID
Grp_#
Pkg_cd
Section_num
1
333
108
B01M
2
333
108
E01M
3
333
108
U01M
4
444
008
B04F
5
444
008
D04F
6
444
008
M04F
7
444
008
U04F
8
444
128
B04F
9
444
128
C04F
10
444
128
U04F
11
111
123
B01E
12
222
002
B01G
13
222
007
M04G
Result Table
Grp_#
Grp_Name
Package num
111
aaa
123
222
bbb
002
222
bbb
007
333
ccc
108-B01M
333
ccc
108-E01M
333
ccc
108-U01M
444
ddd
008-B04F
444
ddd
008-D04F
444
ddd
008-M04F
444
ddd
128-B04F
444
ddd
128-C04F
444
ddd
128-C04F
444
ddd
128-U04F
Thanks in advance.
Thanks
Pathan

I am very sorry, please ignore this mail..... I have pasted more thread. I am unable to paste table format over here.
Thanks
Pathan

Similar Messages

  • Please Give me reply for this problem(How can I get the result)???

    Hello Friends,
    I have one table CXATCMS.Which has 3 columns and has the following data
    start_no end_no activity_date
    05001000001 05001000002 01-OCT-03
    05001000015 05001000016 01-OCT-03
    05001000017 05001000018 12-JUN-05
    05001000019 05001000020 12-JUL-06
    I have to create a report which lists the the specific range.
    If the next record's start_no is the immediate next number for the prevoius record's
    end_no .....then it has to display all those numbers in a range until it finds a number which is not next immediate number for the previous record's end number.
    like for example....if the user wants to see from 1 to 20 range.
    then the result must be like this........
    start_no end_no
    05001000001 05001000002-------there is no 05001000003 number in the
    05001000015 05001000020 start numbers so it has to stop its range by this number).
    How can i get this result........

    Hi,
    Try this. I am sure you know how to write procedure, I have skipped those obligations, anyway u can sense the absic way of working from here I think. Pls do the uppercase / lowercase adjustment as required by your operating system.
    Declare
    mnd CXATCMS.end_no%type;
    numRec CXATCMS.%rowtype;
    Cursor C is select * from CXATCMS where start_no between 1 and 20 order by start_no;
    begin
    select min(end_no)+1 into mnd from CXATCMS where start_no between 1 and 20;
    open C;
    Loop
    fetch C into numRec;
    DBMS_OUTPUT.putline(numRec);
    exit when mnd<>numrec.start_no;
    if mnd=numrec.start_no then
    mnd:=numRec.end_no + 1;
    end if;
    end loop;
    Exception
    when no_data_found raise application_error;
    end;
    gimme feadback pl,
    Pragati.

  • [SQL] how can i get this result....??(accumulation distinct count)

    [SQL] how can i get this result....??(accumulation distinct count)
    Hi everybody,
    pls tell me how can it possible to get result?
    ### sample data
    date visitor
    10-01 A
    10-01 A
    10-01 B
    10-01 B
    10-01 C
    10-01 C
    10-02 A
    10-02 C
    10-02 C
    10-02 D
    10-02 D
    10-03 B
    10-03 B
    10-03 B
    10-03 A
    10-03 A
    10-03 F
    10-04 A
    10-04 A
    10-04 F
    result that i want...like this.
    date date_unqiue_visitors acc_date_unique_visitors
    10-01 3 3
    10-02 3 4
    10-03 3 5
    10-04 2 5
    date distinct visitors : count(distinct visitor)
    but how can i get accumulation distinct visitor count???
    Thanks to every body..

    SQL> select dt,cnt,sum(cnt1) over(order by dt) cnt1
      2  from(
      3  select dt,count(distinct visitor) cnt,sum(flg) cnt1
      4  from
      5   (select dt,visitor,(select decode(count(*),0,1,0)
      6                           from test
      7                           where rowid < t.rowid
      8                           and visitor = t.visitor) flg
      9   from test t)
    10  group by dt);
    DT                CNT       CNT1
    10-01               3          3
    10-02               3          4
    10-03               3          5
    10-04               2          5
    Message was edited by:
            jeneesh
    Wrong...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • TS3198 i just unlocked my i phone 4s. how can i get that result?

    i just unlocked my i phone 4s. how can i get that result?

    1# Make sure you have an internet connection in iTunes.
    2# An AT&T Real MicroSIM(not one that has been cut down) must be in the phone.
    3# Restore in iTunes.
    Hope this helps!!

  • How can I get spool result for background mode AFAB

    Dear experts,
    Could you help me? My users run AFAB without run that in test mode. Therefore sometimes I have a difference in ledger (main book) and FI-AA. I am wanting to write coat for AFAB where I am runing programme in test mode and then run that in workering mode. AFAB run in background.
    How can I get result first (test) run from spool? Could you tell me any solutions for that problem?
    Thanks and Best Regards

    You can create one warpper program which can submit the report in the background job with option to send the output to MEMORY. You can use the JOB_OPEN and JOB_CLOSE FMs to schedule a background job.
    Than you can use the FM 'LIST_FROM_MEMORY'  to get the results from the memory.
    Like:
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    Regards,
    Naimesh Patel

  • How can I get the result of web forms by mail ????

    Hi,
    please,
    can someone help me, I spent two days looking on internet to know what I need to install on the web server to get the result of web forms and send it by mail.
    I can't find anything and I don't know what I should look for too ?
    Thanks

    Hi,
    thanks for your answer but I was in fact trying to install Formication, I already opened a thread here :
    http://discussions.apple.com/thread.jspa?threadID=841656&tstart=0
    Can you help me with this one ?
    I installed the last release of FormMail and it start to work now but I'm more insterested in "Formication".
    I'm since two days trying to find documentation for this one and I finally decided to write directly to the author as I really can't find anything to install and use it.
    If you know how to install or have any direction to give me it would be really fine.
    Thanks

  • How can i get select result in varray

    Hi,
    I am new in oracle. I have the following sproc it return around 500 records but OCCI takes long time to get all records due to one-by-one records fetch.
    TYPE rec_type is record ( f1 integer, f2 integer, f3 integer,f4 integer );
    TYPE id_rec_type IS REF CURSOR RETURN rec_type;
    PROCEDURE get_s_data (
    v_s IN VARCHAR2,
    v_p IN INTEGER ,
    v_d IN INTEGER ,
    o_cd OUT NUMBER ,
    o_id OUT id_rec_type ) IS
    BEGIN
    DECLARE
    v_start_date DATE;
    BEGIN
    select get_start_date(TO_CHAR(SYSDATE,'DD-MON-YYYY') ,-1* v_d ) into v_start_date from dual;
    OPEN o_id FOR
    SELECT f1 , f2 , f3, f4
    FROM T1
    WHERE s1 = v_s
    AND timestamp >= v_start_date;
    END;
    I want to convert above sproc in VARRAY/Table to utilize bulk fetch
    I am not sure how to convert multicolumns select result in varray.
    example in document use only one column in varray from select statement.
    some exmple use cursor with bulk fetch but problem is cursor need to define in declare section.
    I have one condition in where clause and get calculate in sproc.
    any suggestion?

    thanks for reply.
    It doesn't work with ref cursor as output parameter in sproc.
    Please see my post in OCCI forums.
    Performance problem with sproc and out parameter ref cursor
    after spending some time found one way.
    prcedure p1 ( i1 IN integer , i2 IN integer, v1 OUT varray_type )
    declare
    cursor c1 is
    select c1 , c2 , c3 , c4
    from t1
    where c1 > i1 and c2 > i2;
    begin
    open c1;
    fetch c1 bulk collect into v1;
    close c1;
    end;
    procedure p2 ( v1 OUT varry_type )
    declare
    i1 integer
    i2 integer
    begin
    i1 := new_calculate_value(i2);
    i3 := calculate_s(i2);
    p1(i1,i3,v1);
    end;
    above method allow us to calculate where clause value before cursor define and get filter data.
    I am working OCCI to get varray from above method.

  • How can i get this result?

    I want to make a menu bar like this:
    http://otn.oracle.com/tech/blaf/specs/tabs_nav/level2_tabs.gif
    Please help me.
    Thanks.

    You want to use a pageLayout with tabs and pageHeader filled with tabBar and globalHeader respectively. You can find information about pageLayout and these other components in the UIX Developer's Guide and the UIX Element Reference, available in JDeveloper's help system or online at: http://otn.oracle.com/jdeveloper/help
    You can also get this by using the wizard to create a UIX page with header, footer and navigation -- it will set this up for you.
    A simple example would be like this:
    <pageLayout>
    <tabs>
    <tabBar>
    <contents>
    <link text="Home" destination="#" />
    <link text="Shop" destination="#" selected="true" />
    <link text="Order History" destination="#" />
    </contents>
    </tabBar>
    </tabs>
    <pageHeader>
    <globalHeader>
    <contents>
    <link text="Catalogs" destination="#" selected="true" />
    <link text="Shopping Lists" destination="#" />
    <link text="Corporate Lists" destination="#" />
    </contents>
    </globalHeader>
    </pageHeader>
    <contents>
    <!-- main body of your page goes here -->
    </contents>
    </pageLayout>

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • How can i get value when the field name is user's defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    You should give the user defined name in the ResultSet.getXXX method to retrieve the column value.
    Example
    SQL:
    Select ename as employeename from emp;
    You should say :
    ResultSet.getString("employeename"); to get the value.
    Alternatively you can retrieve it using column number:
    ResultSet.getString(1);
    Chandar

  • How can i get the value when the field name is user defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count(*) as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    Hi Ricky
    To access pseudo columns you can specify an alias or use the index on the column (e.g. getInt(1)).
    Chris
    NB: you should use bind variables instead of concatenating the id to the SQL statement.

  • How can i get the external Sql result return data to abap?

    Dear All
             I have a problem to how to get the select  result data return abap.
    I used abap to run external SQL server. below is my code:
    ***in above ,abap has already connected external SQL.
    Sql = u2018select * from user01u2019
          CALL METHOD OF rec 'Open'
            EXPORTING #1 = sql
            #2 = con
            #3 = '1'.
          IF NOT sy-subrc = 0.
            MESSAGE e000 WITH 'run external sql error!'.
          ENDIF.
    ***now ,below code how can I get the select result to abap code?
    I know I can use native_sql  such as u2018OPEN CUR1 FOR SELECT * FROM user01 AND FETCH NEXT CUR1 INTO :WAu2019.
        Thanks for all
    Sun

    Thanks.
    it is okay now by myself.
    con_str = 'Provider=SQLOLEDB.1;Password=pwd;Persist Security Info=True;User ID=name;Initial Catalog=VTL_DEMO;Data Source=192.168.21.50'.
      CREATE OBJECT o_conn 'ADODB.Connection'.
      CREATE OBJECT o_rec 'ADODB.Recordset'.
      SET PROPERTY OF o_conn 'Provider' = provider.
      SET PROPERTY OF o_conn 'ConnectionString' = con_str.
      CALL METHOD OF o_conn 'Open'.
      sql_str = 'select *  from userh'.
      CALL METHOD OF o_conn 'Execute' = o_recordset
        EXPORTING
        #1 = sql_str.
       #2 = o_conn.
      GET PROPERTY OF o_recordset 'EOF' = rs_eof.
      REFRESH itab.
      WHILE rs_eof NE 1.
        CALL METHOD OF o_recordset 'fields' = o_field
          EXPORTING
          #1 = 0.
        GET PROPERTY OF o_field 'Value' = itab-name.
        CALL METHOD OF o_recordset 'fields' = o_field
          EXPORTING
          #1 = 1.
        GET PROPERTY OF o_field 'Value' =  itab-cid.
        APPEND itab.
        CALL METHOD OF o_recordset 'MoveNext'.
        GET PROPERTY OF o_recordset 'EOF' = rs_eof.
      ENDWHILE.

  • HT4929 I have os x 10.6.8. When I try to update it says there are no updates for my sytstem.  I want to get iCloud on my Mac Book Pro and one of the requirements is 10.7.2 how can I get this done?

    I have os x 10.6.8. When I try to update it says there are no updates for my system.  I want to get iCloud on my Mac Book Pro and one of the requirements is 10.7.2 how can I get this done?

    Welcome to the Apple Community.
    You can purchase Lion from the Mac App Store. You will need to meet the requirements for Lion, but the Mac App Store will tell you whether your Mac is capable of running Lion or not.

  • I am trying to update the eBay Mobile app but it keeps saying This app requires iOs5. I have a 3G How can I get iOS 5.

    I am trying to update the eBay Mobile app but it keeps saying This app requires iOs5. I have a 3G How can I get iOS 5.

    You cannot.
    iphone 3g can only go to 4.2.1
    The iphone 3g was released 5 years ago.  This is very old in tech terms.

  • How can I get Quicktime to open my WMA file- it says a required codec is not available

    How can I get Quicktime to open my WMA file- it says" a required codec is not available"?

    please jon, where I can find those "Flip4Mac" codec packages?
    Gp to http://www.telestream.net/flip4mac/ to see a comparison list of codec components available and what each set can do.

Maybe you are looking for