Display columns from two tables without making join

Hi,
I need to perform currency conversion in the report.
For eg:) Whatever the currency in ar_payment_schedules i want to
convert it to INR equivalent.
Following is the query to do this.
select ps.invoice_currency_code Currency_B,
     decode(ps.invoice_currency_code, 'INR',ps.amount_due_original,
               round(ps.amount_due_original*
                              ps.exchange_rate,
                         curr.precision)
     from
          ar_payment_schedules     ps,
          fnd_currencies          curr
     where ps.customer_id          = '111'
     and curr.currency_code      = 'INR'
When i do this in the Administration tool, the answers modules erroring out saying
that no joins between ar_payment_schedules and fnd_currencies. But here join is
not needed becuase fnd_currencies is filtered with INR and will return only
one row. Without joining two tables how can i get the same results in Answers.
thanks,
Prasanna

If it would return only one row then what is the need for the join (is it just for returning the precision?). Cant you just hard code the precision value instead of getting it from the table? Also you are doing a cartesian join, though the filters would take care of the final output this would result in a bad performance as your data starts scaling out. You need to find a key to join these 2 tables. If you do not have one, then just create a view with the cartesian join alone and then use that in your report.
Thanks,
Venkat
http://oraclebizint.wordpress.com

Similar Messages

  • Data fetch from two table without refresh

    hi Friends,
    I have a problem i want to extract data from two table without refresh into text field when i'll enter any value in a text field then corressponding value should come in to corressponding textfield.
    eg. there two table A and B.
    Table A has Colunm
    s_id Number;
    c_id Varchar2(30);
    sec varchar2(4);
    Second Table B Colunm Name
    s_id Number;
    f_name varchar(30);
    l_name varchar(20);
    when i enter s_id 101 in a text field then the c_id ,sec,first_name and last_name should come in to corressponding text fields without refresh.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    You have to make an Ajax call to display data without refreshing the page. Search this forum for Ajax and you can find lots of related posts. This link might help too. http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
    Thanks,
    Manish.

  • Selecting columns from two table is slow but same

    I am selecting 27 columns from two tables
    which running for more than 30 minutes. but
    if I select count(*) with the same query
    except the columns it is coming in seconds.
    Where is the error?

    If you post
    1) The table definitions for the underlying tables
    2) The indexes that are on the tables
    3) The two SQL statements you're running
    4) The explain plan for both statements
    we can probably be of some assistance.
    My guess is that the count(*) is able to return much more quickly because the optimizer is able to use a significantly faster query plan that is based on an index which the longer-running query cannot utilize. Without the information I've requested, though, it's hard to do more than speculate.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Create a procedure which requires displaying information from two tables

    What if we want to create a procedure which requires displaying information from two tables. In this situation,
    I need to display all the details of an employee from an 'emp' table based on the deptno. and also their salary information which is
    stored in "Salgrade" Table. Is the use of "And" the correct way of using it?
    Do I need to declare all the attributes before begin or I can just access them directly? Thanks
    Create Procedure findDept
    ( I_deptno IN number
    ) As
    Begin
    Select Ename, Job, MGR, Hiredate, Sal, Comm, Dept_no from emp and exp, grade , location from salgrade where dept_no
    = I_Deptno;
    Exception
    When NO_Data_Found then
    DBMS_Output.Put_Line(' Department not found"|| I_deptno);
    End findDept;

    Hi,
    Besides Qwerty's remark, you've also got a quoting error:
    Change
    DBMS_Output.Put_Line(' Department not found"|| I_deptno);
    {code}
    into
    {code}
    dbms_output.put_line(' Department not found: '|| i_deptno);
    {code}
    Which leads to the question:
    What do you want to do when a record is found?
    Display it?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Selecting from two tables but making it just one selection

    Is there a way to select from two tables and just have one selection appear?
    Specifically I have a fact_install_unit, and a fact_install_arch table.
    Sometimes the value exists in fact_install_unit.factory_timestamp, and sometimes when fact_install_unit.factory_timestamp is null I need to pull it from the fact_install_arch.factory_timestamp.
    sort of like:
    (select fact_install_unit.factory_timestamp
    from fact_install_unit, fact_install_arch
    where fact_install_unit.fl_unit_sak = fact_install_arch.fl_unit_sak
    and where fact_install_unit.factory_timestamp is null then display fact_install_arch.factory_timestamp)

    > I was just stating that I do not have sufficient priveleges to create views in this database.
    >
    nm means "no more" than that
    And how are we supposed to know that? You seem to have changed the thread subject to "unfortunately I only have read-only and insufficient priveleges", which is not even a question.
    nm means "New Mexico":
    http://www.myshortpencil.com/schooltalk/messages/85/515.html?971794944

  • How to use common object from two tables with out join.

    HI,
    I have two tables called A & B In A table i have the following objects
    1.weekend
    2.S1(measure)
    3.S2(measure)
    4.S3(measure)
    5.S4(measure)
    And In B table i have followning columns
    1.week end
    2.p1(measure)
    3.p2(measure)
    4.p3(measure)
    5.p4(measure)
    Now in universe i created all the measure objects i.e.s1,s2,s3,s4,p1,p2,p3,p4 A.weekend,B.weekend.
    instead of using week end two times i wnt to use only once because this is common in both table.
    if i use join between these tables i am getting values fine
    But With out join is there any thing to do in universe level to create common objects to use from both the tables..I tried using aggregate awareness but while reporting it is taking as two SQL.which is not synchronized.
    Please help me on this ...

    hi,
    Although  Weekend column is present in both tables, by creating a single Object in Universe, Universe can identify relationship with only table referenced in Object Creation.
    So, there will be no identification of relationship with other table measures.
    Obviously, you need to create 2 Weekend objects in Universe (in two classes).
    Case 1: You need not join these two tables in Universe. When you create 2 Queries in WEBI, automatcially Weekend objects are synchronized (if both are of same datatype)
    Case 2: If you join these two tables in Universe, Obviously,
    your SQL may contain Weekend from Table1, measures from Table 2
    or
    your SQL may contain Weekend from Table2, measures from Table 1
    Finally, You need to create 2 objects in Universe. But your query may contain a single Object based on Case 2.
    Regards,
    Vamsee

  • Combinig two tables without a JOINER

    Hi,
    I got a little problem. I want to combine two tables. But I don't need a joiner, cause that would give me wrong combined values.
    I have a table working_hours which has the actual working hours of employees. And a table times_absent which has the absent time of the employees.
    Both tables have the date and actual hours of work and absent besides other tings in it.
    I simple want to combine these two tables to one big table.
    Example:
    Table working_hours :
    Name --- Date --- Hours -- ....
    Mr.A --- 2.5.2011 --- 8 --- ...
    Mr.B --- 2.5.2011 --- 6 --- ...
    Mr.C --- 2.5.2011 --- 7 --- ...
    Table times_absent:
    Name --- Date --- Days --- ....
    Mr.A --- 3.5.2011 --- 1 --- ...
    Mr.B --- 3.5.2011 --- 2 --- ...
    Mr.B --- 4.5.2011 --- 2 --- ...
    New Table:
    Name --- Date --- Working_Hours --- Absent_Days ---
    Mr.A --- 2.5.2011 --- 8 ---- null - or some sort of dummy value XXX
    Mr.A --- 3.5.2011 --- null --- 1 ---
    Mr.B --- 2.5.2011 --- 6 --- null ---
    Mr.B --- 3.5.2011 --- null --- 2 ---
    Mr.B --- 4.5.2011 --- null --- 2 ---
    and so one.
    Is there a possibility in the OWB to perform such task?
    thx

    As MccM says you need to make the columns in your IN groups the same i.e. the same structure as your new table.
    Connect WORKING HOURS to IN GROUP 1 and ABSENT to IN GROUP 2 for the columns that exist.
    Create a numeric CONSTANT with a default value of NULL and connect that to ABSENT_DAYS in IN GROUP 1 and WORKING_HOURS in IN GROUP 2.
    You don't need to change the structure of your tables.

  • Unable to retrive data from two tables using multiple joins

    Hi,
    Table:   EMP mgr 
    eid              name
    eid mgrid
    1
    A 1
    null
    2
    B 2
    3
    3
    C 3
    3
    i need to get result as:
    eid ename mgrname
    thanks
    AVS

    Sai,
    It would be very helpful if you could mention your table structures a bit more clearly. Would allow for effective replies from fellow users as well. :) 
    However, assuming that your structure would be as follows presenting the query as below:
    DECLARE @Emp TABLE(Eid Int, ename Varchar(50))
    DECLARE @Emp_Mgr TABLE(Eid int, mgrid int null )
    INSERT INTO @Emp select 1,'Ram'
    INSERT INTO @Emp select 2,'Shyam'
    INSERT INTO @Emp_Mgr select 1,NULL
    INSERT INTO @Emp_Mgr select 2,1
    SELECT * FROM @Emp
    SELECT * FROM @Emp_Mgr
    Query to print results as EID, ENAME, MGRNAME
    SELECT em.eid,e1.ename as ENAME,e2.ename as MGRNAME
    FROM @Emp_Mgr em
    JOIN @Emp e1 ON em.eid=e1.eid
    JOIN @Emp e2 ON em.mgrid=e2.eid
    However, as you see this approach of maintaining two tables for preserving the employee-manager data is redundant and makes the queries unnecessarily complex. So, you could opt for the widely used single table format as mentioned by Praveen as well. Check
    if this helps you..
    Recommended Structure
    *Avoidance of redundant storage of data
    *Lesser Joins in queries
    DECLARE @Emp TABLE(Eid Int , Ename Varchar(50) , mgrid int null )
    INSERT INTO @Emp(Eid , ename , mgrid) values(1 , 'Ram' , null) , (2 , 'Shyam' , 1)
    SELECT * FROM @Emp
    Query to print results as EID, ENAME, MGRNAME
    SELECT e.Eid , e.Ename , m.Ename as MgrName
    FROM @Emp e
    JOIN @Emp m On a.mgrid = b.eid
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to find diffrence in columns from two tables

    Hello,
    I have table TABLE1 and TABLE2 with same columns. One of the columns in both tables is ID
    Now there are records in table TABLE1 with ID=1
    and in table TABLE 2 with ID=-1
    Now I want to find if there are any column differing in values in tables TABLE1 for ID=1(for TABLE1) and TABLE2 for ID = -1 (for TABLE2)
    What is the best way to find the diffrence?
    Thanks in advance.

    Hello Subhash,
    Why don't you try NOT EXISTS functionality? Its quite performance effective too.
    select * from table1
    where NOT EXISTS
    (select 1 from table 2
    where table1.ID = table2.ID)
    UNION
    select * from table2
    where NOT EXISTS
    (select 1 from table 2
    where table1.ID = table2.ID)You can go for UNION if required, or else you can use them separately.

  • Retrive data from 4 tables without using joins

    hi ,
    i have to retrive data from 4 tables........but i donot want to use joins because of performance issues.
    please guide me how to proceed further ?
    thanks

    hi manish,
    CONSTANTS: c_act_plan(2)    TYPE c VALUE 'U1'      ,
               c_person(1)      TYPE c VALUE 'P'       ,
               p1_betid(8)      TYPE c VALUE '50005316',
               c_topdown(1)     TYPE c VALUE 'A'       ,
               c_admnby(3)      TYPE c VALUE '032'     ,
               c_bet_type(1)    TYPE c VALUE 'Q'       ,
               c_firmed(1)      TYPE c VALUE '1'       ,
               c_subtyp_mail(4) TYPE c VALUE '0001'    .
    TYPES: BEGIN OF ty_hrp1001,
             objid TYPE hrp1001-objid,
           END OF ty_hrp1001,
           BEGIN OF ty_pa0001,
             pernr TYPE pa0001-pernr,
             subty TYPE pa0001-subty,
             objps TYPE pa0001-objps,
             sprps TYPE pa0001-sprps,
             endda TYPE pa0001-endda,
             begda TYPE pa0001-begda,
             seqnr TYPE pa0001-seqnr,
             werks TYPE pa0001-werks,
             gsber TYPE pa0001-gsber,
             btrtl TYPE pa0001-btrtl,
           END OF ty_pa0001,
           BEGIN OF ty_t500p,
             persa TYPE t500p-persa,
             name1 TYPE t500p-name1,
           END OF ty_t500p,
           BEGIN OF ty_t001p,
             werks TYPE t001p-werks,
             btrtl TYPE t001p-btrtl,
             btext TYPE t001p-btext,
           END OF ty_t001p,
           BEGIN OF ty_pa0002,
             pernr TYPE pa0002-pernr,
             subty TYPE pa0002-subty,
             objps TYPE pa0002-objps,
             sprps TYPE pa0002-sprps,
             endda TYPE pa0002-endda,
             begda TYPE pa0002-begda,
             seqnr TYPE pa0002-seqnr,
             nachn TYPE pa0002-nachn,
             vorna TYPE pa0002-vorna,
           END OF ty_pa0002,
           BEGIN OF ty_pa0105,
             pernr      TYPE pa0105-pernr     ,
             subty      TYPE pa0105-subty     ,
             objps      TYPE pa0105-objps     ,
             sprps      TYPE pa0105-sprps     ,
             endda      TYPE pa0105-endda     ,
             begda      TYPE pa0105-begda     ,
             seqnr      TYPE pa0105-seqnr     ,
             usrid_long TYPE pa0105-usrid_long,
           END OF ty_pa0105,
           BEGIN OF ty_output,
             pernr      TYPE pa0002-pernr     ,
             werks      TYPE pa0001-werks     ,
             gsber      TYPE pa0001-gsber     ,
             btrtl      TYPE pa0001-btrtl     ,
             name1      TYPE t500p-name1      ,
             btext      TYPE t001p-btext      ,
             nachn      TYPE pa0002-nachn     ,
             vorna      TYPE pa0002-vorna     ,
             usrid_long TYPE pa0105-usrid_long,
           END OF ty_output.
    DATA: w_hrp1001     TYPE                 ty_hrp1001,
          t_hrp1001     TYPE        TABLE OF ty_hrp1001,
          t_hrp1001_tmp TYPE        TABLE OF ty_hrp1001,
          w_pa0001      TYPE                 ty_pa0001 ,
          t_pa0001      TYPE SORTED TABLE OF ty_pa0001
            WITH NON-UNIQUE KEY pernr                  ,
          t_pa0001_tmp  TYPE        TABLE OF ty_pa0001 ,
          w_t500p       TYPE                 ty_t500p  ,
          t_t500p       TYPE HASHED TABLE OF ty_t500p
            WITH UNIQUE KEY persa                      ,
          w_t001p       TYPE                 ty_t001p  ,
          t_t001p       TYPE HASHED TABLE OF ty_t001p
            WITH UNIQUE KEY werks btrtl                ,
          w_pa0002      TYPE                 ty_pa0002 ,
          t_pa0002      TYPE SORTED TABLE OF ty_pa0002
            WITH NON-UNIQUE KEY pernr                  ,
          t_pa0002_tmp  TYPE        TABLE OF ty_pa0002 ,
          w_pa0105      TYPE                 ty_pa0105 ,
          t_pa0105      TYPE SORTED TABLE OF ty_pa0105
            WITH NON-UNIQUE KEY pernr                  ,
          w_output      TYPE                 ty_output ,
          t_output      TYPE        TABLE OF ty_output .
    SELECT objid
      FROM hrp1001
      INTO TABLE t_hrp1001
      WHERE otype EQ c_person
      AND   plvar EQ c_act_plan
      AND   rsign EQ c_topdown
      AND   relat EQ c_admnby
      AND   istat EQ c_firmed
      AND   begda LE sy-datum
      AND   endda GT sy-datum
      AND   sclas EQ c_bet_type
      AND   sobid EQ p1_betid.
    IF sy-subrc EQ 0.
      SORT t_hrp1001 BY objid.
    ENDIF.
    IF NOT t_hrp1001[] IS INITIAL.
      t_hrp1001_tmp[] = t_hrp1001[].
      DELETE ADJACENT DUPLICATES FROM t_hrp1001_tmp
        COMPARING objid.
      SELECT pernr
             subty
             objps
             sprps
             endda
             begda
             seqnr
             werks
             gsber
             btrtl
        FROM pa0001
        INTO TABLE t_pa0001
        FOR ALL ENTRIES IN t_hrp1001_tmp
        WHERE pernr EQ t_hrp1001_tmp-objid
        AND   endda GT sy-datum
        AND   begda LE sy-datum.
      SELECT pernr
             subty
             objps
             sprps
             endda
             begda
             seqnr
             nachn
             vorna
        FROM pa0002
        INTO TABLE t_pa0002
        FOR ALL ENTRIES IN t_hrp1001_tmp
        WHERE pernr EQ t_hrp1001_tmp-objid
        AND   endda GT sy-datum
        AND   begda LE sy-datum.
    ENDIF.
    IF NOT t_pa0001[] IS INITIAL.
      t_pa0001_tmp[] = t_pa0001[].
      SORT t_pa0001_tmp BY werks btrtl.
      DELETE ADJACENT DUPLICATES FROM t_pa0001_tmp COMPARING werks btrtl.
      SELECT werks
             btrtl
             btext
        FROM t001p
        INTO TABLE t_t001p
        FOR ALL ENTRIES IN t_pa0001_tmp
        WHERE werks EQ t_pa0001_tmp-werks
        AND   btrtl EQ t_pa0001_tmp-btrtl.
      DELETE ADJACENT DUPLICATES FROM t_pa0001_tmp COMPARING werks.
      SELECT persa
             name1
        FROM t500p
        INTO TABLE t_t500p
        FOR ALL ENTRIES IN t_pa0001_tmp
        WHERE persa EQ t_pa0001_tmp-werks.
    ENDIF.
    IF NOT t_pa0002[] IS INITIAL.
      t_pa0002_tmp[] = t_pa0002[].
      DELETE ADJACENT DUPLICATES FROM t_pa0002_tmp COMPARING pernr.
      SELECT pernr
             subty
             objps
             sprps
             endda
             begda
             seqnr
             usrid_long
        FROM pa0105
        INTO TABLE t_pa0105
        FOR ALL ENTRIES IN t_pa0002_tmp
        WHERE pernr EQ t_pa0002_tmp-pernr
        AND   subty EQ c_subtyp_mail
        AND   endda GT sy-datum
        AND   begda LE sy-datum
        AND   usrty EQ c_subtyp_mail.
    ENDIF.
    REFRESH t_output.
    LOOP AT t_hrp1001 INTO w_hrp1001.
      LOOP AT t_pa0001 INTO w_pa0001
        WHERE pernr EQ w_hrp1001-objid.
        READ TABLE t_t500p INTO w_t500p WITH KEY persa = w_pa0001-werks
                                                 TRANSPORTING
                                                   name1.
        CHECK sy-subrc EQ 0.
        READ TABLE t_t001p INTO w_t001p WITH KEY werks = w_pa0001-werks
                                                 btrtl = w_pa0001-btrtl
                                                 TRANSPORTING
                                                   btext.
        LOOP AT t_pa0002 INTO w_pa0002
          WHERE pernr EQ w_hrp1001-objid.
          LOOP AT t_pa0105 INTO w_pa0105
            WHERE pernr EQ w_pa0002-pernr.
            w_output-pernr      = w_pa0002-pernr     .
            w_output-werks      = w_pa0001-werks     .
            w_output-gsber      = w_pa0001-gsber     .
            w_output-btrtl     = w_pa0001-btrtl      .
            w_output-name1      = w_t500p-name1      .
            w_output-btext      = w_t001p-btext      .
            w_output-nachn      = w_pa0002-nachn     .
            w_output-vorna      = w_pa0002-vorna     .
            w_output-usrid_long = w_pa0105-usrid_long.
            APPEND w_output TO t_output.
            CLEAR w_output.
          ENDLOOP.
        ENDLOOP.
      ENDLOOP.
    ENDLOOP.
    Reward if usful,
    Thanks,
    Srikanth.A

  • Display records from two tables in a Repeat Region

    I have 2 tables tblNames and tblResults
    tblNames
    NamesID PK
    FirstName
    LastName
    Address1
    Addrees2
    tblResults
    ResultsID PK
    NamesID FK
    ResultsInfo
    ResultsDate
    Results table has a foreign key NamesID containing primary
    key of Names table.
    I am trying to show a repeat region of results, with a column
    showing LastName of tblNames depending on the ResultsID
    I have 2 recordsets, rsNames and rsResults but I'm having
    trouble showing relevant LastName.

    Create a new recodset or modify one of the old ones with this
    sql:
    SELECT LastName, ResultsInfo, ResultsDate
    FROM tblResults INNER JOIN tblNames USING (NamesID)
    ORDER BY LastName
    This will produce a list of LastNames and associated info
    Dave Buchholz
    I-CRE8
    www.i-cre8.co.uk
    Skype ID: I-CRE8
    "Swn-Y-Mor" <[email protected]> wrote in
    message
    news:f1ndo2$cp9$[email protected]..
    >I have 2 tables tblNames and tblResults
    >
    > tblNames
    > --------
    > NamesID PK
    > FirstName
    > LastName
    > Address1
    > Addrees2
    >
    > tblResults
    > ----------
    > ResultsID PK
    > NamesID FK
    > ResultsInfo
    > ResultsDate
    >
    > Results table has a foreign key NamesID containing
    primary key of Names
    > table.
    >
    > I am trying to show a repeat region of results, with a
    column showing
    > LastName
    > of tblNames depending on the ResultsID
    > I have 2 recordsets, rsNames and rsResults but I'm
    having trouble showing
    > relevant LastName.
    >

  • How to find common columns from two tables

    regards

    812809 wrote:
    regardsHi,
    Use User_tab_cols view to extract the result.
    Try
    SQL> create table test3(id number(10),name varchar2(10));
    Table created.
    SQL> create table test4(id number(20),addr varchar2(200));
    Table created.Now query user_tab_cols
    SQL> select column_name from user_tab_cols where table_name='TEST3'
      2  intersect
      3  select column_name from user_tab_cols where table_name='TEST4'
      4  /
    COLUMN_NAME
    IDHope this helps
    Regards,
    Achyut
    Ps-> Mark as Complete/Answered if it meets your requirement

  • Columns from different tables displayed in an ADF table format

    I have a many to one relationship between 2 tables (checklist -> subcontract). I would like to display columns from each table on a web page in an ADF Read Only Table format. I created a method that returns the data I need from the tables. When I drag that method over to my page JDev I'm only allowed to select columns from either the checklist table OR the subcontract table. I need one column from the subcontract table and several columns from the checklist table. I'm using JDev 10.1.3.2 and an Oracle 11g database. Thank you in advance.
    -Wade

    Thank you for your response. I ended up creating a new getter in the Checklist table which refers to the column in the Subcontract table. Then I was able to create a table column for that returned value.
    Thanks again!
    -W

  • Combining two tables without any distinct columns between them

    Folks,

    Hi sidy2j,
    According to your description, we need to verify your table structures, and the actual results which you want to get from your tables. Please post more information for analysis.
    Assume, if you want to a one to one record mapping between  two tables without any common column between them for joining, you can refer to the following scripts to implement your requirement. For more information, see:
    http://sqlhints.com/2013/09/07/joining-two-tables-without-any-common-column-between-them-sql-server/
    If you want to match every row in the first table with every row in the second table, you can refer to the following detail.
    http://stackoverflow.com/questions/1198124/combine-two-tables-that-have-no-common-fields
    Hope it can help you.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Sum two different columns from two different tables

    Can you select and sum two different columns, from two different tables in the same sql statement?
    i.e.
    table1
    Item----OnHand_Qty
    A--------10
    A--------15
    B--------10
    B--------10
    C--------20
    table2
    Item----Trx_Qty
    A--------2
    A--------4
    A--------6
    B--------1
    B--------1
    C--------4
    I'm looking for the following results from a query
    Item----Sum(Onhand_Qty)---Sum(Trx_Qty)
    A--------25

    Like this?
    SQL> create table table1 (item,onhand_qty)
      2  as
      3  select 'A', 10 from dual union all
      4  select 'A', 15 from dual union all
      5  select 'B', 10 from dual union all
      6  select 'B', 10 from dual union all
      7  select 'C', 20 from dual union all
      8  select 'D', 30 from dual
      9  /
    Tabel is aangemaakt.
    SQL> create table table2 (item, trx_qty)
      2  as
      3  select 'A', 2 from dual union all
      4  select 'A', 4 from dual union all
      5  select 'A', 6 from dual union all
      6  select 'B', 1 from dual union all
      7  select 'B', 1 from dual union all
      8  select 'C', 4 from dual union all
      9  select 'E', 3 from dual
    10  /
    Tabel is aangemaakt.
    SQL> select nvl(t1.item,t2.item) item
      2       , t1.sum_onhand_qty
      3       , t2.sum_trx_qty
      4    from ( select item, sum(onhand_qty) sum_onhand_qty
      5             from table1
      6            group by item
      7         ) t1
      8         full outer join
      9         ( select item, sum(trx_qty) sum_trx_qty
    10             from table2
    11            group by item
    12         ) t2
    13         on (t1.item = t2.item)
    14  /
    I SUM_ONHAND_QTY SUM_TRX_QTY
    A             25          12
    B             20           2
    C             20           4
    E                          3
    D             30
    5 rijen zijn geselecteerd.Regards,
    Rob.

Maybe you are looking for

  • Broken laptop input mouse & keyboard [xps15z] [post Syu]

    Problems: -laptop's (dell xps 15z) keyboard and mouse not working -X broken I am really stumped here and looking for any help / direction. I am running out of questions to ask, and would appreciate any feedback. What I have tried: -creating a new mod

  • Runtime error when trying to use Thinkvantage system updater

    I get a runtime error when trying to use the Thinkvantage system updater.Have tried it numerous times and this is the exact message: "Runtime error! Program:C:\Program Files\Lenovo\System Update\tvsu.exe This application has requested the Runtime to

  • NOkia make some more flips phones

    Where is flips phones ???? 2.4 screen be nice in a FLIP CLamshell, nice big keys too. S40 S60.... lagging behind in clamshell , tired of seeing touch come out.

  • Diff... between  ALE, IDOC, RFC, BAPI, BADI --- Not clear and clarify

    Hi All     I am learning XI and the difference between " ALE, IDOC, RFC, BAPI, BADI "     Not clear and when to use what and how in point of XI ?    Pl..clarify me Adv..thanks and points --- Rakesh Behera

  • How to handle the Notification Responsses

    I have created a custom process for journal approval workflow for routing the notifications and handling them. My process has a function activity which creates a custom role and assigns users to that custom role which is working fine. The notificatio