About a question using Update ... inner join ?

select *
FROM a
INNER JOIN b ON a.ProductID=b.ProductID
WHERE a.HeadID='000246'
this statement is ok ;
But the following statement does not work ! Why ?
UPDATE a SET
a.Quantity=a.PurchaseQuantity/b.ConversionGene
FROM a
INNER JOIN b ON a.ProductID=b.ProductID
WHERE a.HeadID='000246'

"Because Oracle syntactically does not support that type of construct..." Is a correct statement, but not because "It expects only one table in UPDATE statement". The synatax for an updateable join in Oracle requires a "proper" in-line view to be updated.
As long as the table joined (in my example t1) has a declared unique constraint on the columns used to join by (in my example id), you can do it like:
SQL> SELECT * FROM t;
        ID DESCR
         1 One
         2 Two
         3 Three
SQL> SELECT * FROM t1;
        ID DESCR2
         1 Un
         2 Deux
SQL> UPDATE (SELECT t.descr, t1.descr2
  2          FROM t
  3             JOIN t1 ON t.id = t1.id)
  4  SET descr = descr2;
2 rows updated.
SQL> SELECT * FROM t;
        ID DESCR
         1 Un
         2 Deux
         3 ThreeTTFN
John

Similar Messages

  • MS Access Update Inner Join command conversion

    I have code in a Microsoft Access Database View, that I'm trying to convert to Oracle. I tried using Oracle SQL Developer's Migration tool and it basically skipped this command.
    Update Table1 INNER JOIN Table2 On Table1.COL1 = Table2.COL2 SET Table1.COL3 = 1;
    I've tried a number of things including selecting all the rows with something like
    select * from Table1 o inner join Table2 t on o.COL1 = t.COL2
    and then trying to somehow hook it to an update command where the command gets the above results and does a Table1.COL3 = 1 on all of those rows.
    However I can't get the syntax correct.
    Can someone please help?
    Thanks,
    Jeff
    BTW: The code is in a MS Access view but probably belongs in a stored procedure. It also uses a Access-only Boolean instead of 1, which may be part of the reason the command conversion failed.

    maybe this?
    Update Table1
       set Table1.COL3 = 1
    Where Table1.col1 in (select table2.col2 from table2);
    or
    Update Table1
       set Table1.COL3 = 1
    Where exists (select 'x'
                     from table2
                    where table2.col2 = table1.col1);note: untested.

  • How to  Join two tables using the Inner Join

    Hi All,
    I have two tables i.e table1 and table2 as i have created two otds and my present requirement is to join this two tables and get the results and using this i need to do some logic and update another table3.
    can some one help me out how to go for the above req.
    Thanks in Advance
    Srikanth

    The best efficient way to use inner join is create two input otds,use there otd's in create a collaboration usinf etl.
    after selecting two input otd's create a inner join statement and map it to out put otd.
    while using the etl the performance of the over all integration is increased 20 time of the normal integration.
    Hopes this will helps,,
    Thanks,
    Papa Rao.

  • Noob: failed attempt to update inner join

    I'm attempting to update fields in joined tables bh and bhp, based on information contained in both. The updated fields are not the fields the tables are joined on. I'd expect that to fail but I can't figure out why what I'm trying to do fails. I've read elsewhere in this forum that you can't update views containing joins, and I suspect that's related to this problem, but don't have the experience to understand this better.
    I can easily accomplish this update through Access linked by ODBC. What I can't do is write SQL script to do the same. I want to do that so the update can be scheduled with cron.
    The tables are logs of having run production batches. batchhistory logs the details of the batch (run time, current status) and batchhistorypatient logs details specific to each affected customer. The tables are joined on batchname, starttime, and facility. The 'last' fields are in both tables but they're not a join field and the distinction is maintained with a fully-qualified field name.
    Do I have to create some kind of intermediate view on the fly, and update that?
    Thanks in advance for suggestions or referral to specific documentation and examples.
    UPDATE HCS.BatchHistory BH INNER JOIN HCS.BatchHistoryCustomer BHC ON
    BH.STARTTIME = BHC.STARTTIME AND
    BH.BATCHNAME = BHC.BATCHNAME AND
    BH.facility = BHC.facility
    SET
    BH.LAST = "Y",
    BHC.LAST = "Y"
    WHERE
    BH.STATE="COMPLETE" AND
    BH.DATEOFSERVICE)<GetDate() AND
    BH.last="N" OR
    BHC.last="N"
    Edited by: Chris Cowles on Feb 16, 2009 11:18 AM. Changed
    BHC.LAST = "Y",
    BHC.LAST = "Y" to
    BH.LAST = "Y",
    BHC.LAST = "Y"
    Please excuse my error.

    Example data:
    batchhistory
    batchname, starttime, facility, dateofservice, state, last
    north, 1/1/2009 0900, abc, 1/1/2009 0830, complete, N
    north, 1/2/2009 0900, abc, 1/1/2009 0835, complete, N
    north, 1/3/2009 0900, abc, 1/1/2009 0835, complete, Y
    batchhistorycustomer
    batchname, starttime, facility, customer, dateofservice, state, last
    north, 1/1/2009 0900, abc, 0001, 1/1/2009 0830, complete, N
    north, 1/1/2009 0900, abc, 0002, 1/1/2009 0830, complete, Y
    north, 1/1/2009 0900, abc, 0003, 1/1/2009 0830, complete, Y
    north, 1/2/2009 0900, abc, 0001, 1/1/2009 0835, complete, Y
    north, 1/2/2009 0900, abc, 0002, 1/1/2009 0835, complete, Y
    north, 1/2/2009 0900, abc, 0003, 1/1/2009 0835, complete, N
    north, 1/3/2009 0900, abc, 0001, 1/1/2009 0835, complete, N
    north, 1/3/2009 0900, abc, 0002, 1/1/2009 0835, complete, Y
    north, 1/3/2009 0900, abc, 0003, 1/1/2009 0835, complete, N
    batchhistory.last and batchhistorycustomer.last are independent.

  • Drag-n-n-drop query joins uses WHERE, not INNER JOIN syntax

    When I highlight a few tables and drag them onto the sql worksheet, it will build a select statement for me and join the tables by their foreign keys.
    That's a nice feature, thanks!
    Three questions. Is it possible to:
    1. get it to use the INNER JOIN and LEFT OUTER JOIN syntax instead of joining the tables in the WHERE clause?
    2. control the table aliases so that it will automatically use the "standard alias" for the table instead of A, B, C, etc.?
    3. get it to not put the schema name into the query?
    Thanks!
    Edited by: David Wendelken on Nov 22, 2008 1:48 PM. Grammar mistake.

    Hi Gopi,
    Your code is Good.
    But try to avoid Inner join with more number of Tables ...because this is a performance issue..
    try to use..
    select (primary key fields mainly,other fields) from LIKP into itab where bolnr in p_bolnr(paramater).
    next try to use for all entries option..
    select (primary key fields mainly,other fields) from VBFA for all entries in itab where (give the condition)....
    simillarly do for the other select ....ok this will try to reduce the performance issue....
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • Inner join query used with 7 Database tables

    HI All,
    In a report they used the Inner join Query with 6 Data base table..now there is a performance issue with at query.
    its taking so much of time to trigger that query. Please help how to avoid that performance issue for that.
    In that 2 database tables containing lakhs of records..
    According to my knowledge it can be avoided by using secondary indexs for those 2 database tables..
    and by replacing the Inner join Query with FOR ALL ENTRIES statement.
    i want how to use the logic by using FORALL ENTRIES statement for this..
    So, please give you proper suggestion to avoid this issue..
    Thanking you.
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Oct 16, 2011 10:27 PM

    Hi,
    And what do you mean with "they used"? If "SAP used" then yo will need to ask a SAP for note
    FOR ALL ENTRIES is quite good described in help. Please search forum also.
    Without query it won't be possible to tell how it can be optimized, however you can try to use SE30/SAT and ST05. Maybe it will help you.
    BR
    Marcin Cholewczuk

  • INNER JOIN Where to Use

    hi,
    is there any criteria determining the usage of <b>inner join</b>, i.e no. of rows to be retrieved from the tables... can we avoid using <b>inner joins</b>...
    i hope i have cleared my query.....
    thanx in advance
    abhishek suppal

    Abhishek,
    Inner joins (when used correctly) are a GOOD thing.
    The criteria as to when to use an inner join is that the tables must have common values. For example let's look at VBAK and VBAP. The both share VBELN as their common link. And becasue VBELN is part of their keys it is very good to use an inner join if you need data from both tables.
    eg. We want to get sales Order data into TBL_SALESORDER from VBAK / VBAP
    Without Inner Join you can do it something like this:
    data: begin of tbl_vbak occurs 0,
            vbeln  like vbak-vbeln,
            kunnr  like vbak-kunnr,
            audat  like vbak-audat,
          end of tbl_vbak.
    data: begin of tbl_vbap occurs 0,
            vbeln  like vbap-vbeln,
            posnr  like vbap-posnr,
            matnr  like vbap-matnr,
            zmeng  like vbap-zmeng,
          end of tbl_vbap.
    data: begin of tbl_salesorder occurs 0,
            vbeln  like vbak-vbeln,
            kunnr  like vbak-kunnr,
            audat  like vbak-audat,
            posnr  like vbap-posnr,
            matnr  like vbap-matnr,
            zmeng  like vbap-zmeng,
          end of tbl_salesorder.
    data: l_index like st-tabix.
    select vbeln kunnr audat
           into table tbl_vbak
           from vbak.
    check sy-subrc eq 0.
    select vbeln posnr matnr zmeng
           into table tbl_vbap
           from vbap
           for all entries in tbl_vbak
           where vbeln = tbl_vbak-vbeln.
    check sy-subrc eq 0.
    sort tbl_vbap by vbeln posnr.
    loop at tbl_vbak.
      read table tbl_vbap with key vbeln = tbl_vbak-vbeln
                                   binary search.
      if sy-subrc eq 0.
        l_index = sy-tabix.
        loop at tbl_vbap from l_index.
          if tbl_vbak-vbeln ne tbl_vbap-vbeln.
            exit.
          endif.
          clear tbl_salesorder.
          move-corresponding tbl_vbak to tbl_salesorder.
          move-corresponding tbl_vbap to tbl_salesorder.
          append tbl_salesorder.
        endloop.
      endif.
    endloop.
    With an inner join you can do it like this:
    data: begin of tbl_salesorder occurs 0,
            vbeln  like vbak-vbeln,
            kunnr  like vbak-kunnr,
            audat  like vbak-audat,
            posnr  like vbap-posnr,
            matnr  like vbap-matnr,
            zmeng  like vbap-zmeng,
          end of tbl_salesorder.
    select vbak~vbeln vbak~kunnr vbak~audat
           vbap~posnr vbap~matnr vbap~zmeng
           into table tbl_salesorder
           from vbak
           inner join vbap
           on vbak~vbeln = vbap~vbeln.
    In the above example it is more efficient to use the inner join because we hit the database once. Without the inner join we hit the database twice (once for the VBAK info and the other time for the VBAP info).
    If you want to restrict the data you canuse a select option or parameter like any other SELECT statement. What you probably would not do is use the "UP TO X ROWS" clause as this will essentially limit the data from VBAP not VBAK.
    I know that this example is a very simple one and we were luck to be able to "join" the tables using their primary keys. If the "join" between the tables are not by their primary keys or by an index then you may need to reconsider using an inner join and this will cause performance problems.
    I hope this makes some sense. Let me know if you need more info, alternatively take a look at the SAP Help (F1) for SELECT.
    Cheers,
    Pat.
    PS. Kindly assign Reward Points to the posts you find helpful.

  • Documentation on "Inner Join"

    We are in the process of migrating to Oracle 9.2 and I was reading about some of the new features. In one of the code examples there was a query written using the "inner join" command, something that I was not familiar with but that was not presented as a new feature. I've since tried using this and there appears to be significant performance gains in its use but I am unable to find any documentation relating to it. One of the developers here said that MS Access often uses this syntax so is it included for compatibility or is it something I should be looking to use more often?
    Can someone provide me with the link to the relevant documentation for this feature or explain its use more fully i.e. can it deal with complex joins?
    Thanks
    Richard

    There isn't much documentation that I've found on the ANSI joins. Here is one in the SQL reference:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_103a.htm#2080352
    One advantage to using the ANSI joins is greater flexibility with outer joins. Another advantage is explicit documentation of cartesian products with the CROSS JOIN keyword (no reson to wonder why someone just left out the join). Finally, the ANSI join syntax allows one to remove join-code from the WHERE clause making the WHERE clause much easier to read (it only has conditions).
    As far as performance goes, I haven't noticed any change (good or bad) whilist switching over to ANSI joins...
    Stan

  • Avoid inner join

    Hi experts,
    Iam using following inner join statement. But it is taking lot of time.
    Could any one please tell me how can i combined two tables without inner join.
    Can i use loop statement?
    SELECT a~aufnr
             a~posnr
             a~etenr
             a~werks
             a~matnr
             a~j_3asize
             a~j_4krcat
             a~vdatu
             a~menge
             a~j_3aresm
             INTO TABLE t_j3abdsi
             FROM j_3abdsi AS a INNER JOIN mara AS b
             ON a~matnr = b~matnr
             WHERE b~mtart IN so_mtart AND
                   a~matnr IN so_matnr AND
                   a~werks IN so_werks AND
                   a~vdatu IN so_vdatu.
    thanks
    p.

    Hi Priya,
    Your problem probably lies in the fact that your select statement is not picking an appropriate index for table t_j3abdsi. My system (version 4.7) does not have this table, so I cannot advice you on how to use an index. You will have to arrange the criteria in your where clause to pick the best index or create an index that suits your select. Again creating an index will increase your database size so you will have to weight your pros and cons. If you have an available index, try and make some of your select-options used on the where condition for table t_j3abdsi mandatory.
    Your question however was to convert the code from a join to a for all entries. You can write a code like the one I am showing you.
    TYPES: BEGIN OF ty_t_j3abdsi,
             matnr    TYPE t_j3abdsi-matnr   ,
             aufnr    TYPE t_j3abdsi-aufnr   ,
             posnr    TYPE t_j3abdsi-posnr   ,
             etenr    TYPE t_j3abdsi-etenr   ,
             werks    TYPE t_j3abdsi-werks   ,
             j_3asize TYPE t_j3abdsi-j_3asize,
             j_4krcat TYPE t_j3abdsi-j_4krcat,
             vdatu    TYPE t_j3abdsi-vdatu   ,
             menge    TYPE t_j3abdsi-menge   ,
             j_3aresm TYPE t_j3abdsi-j_3aresm,
             del(1)   TYPE c,
           END OF ty_t_j3abdsi,
           BEGIN OF ty_mara,
             matnr TYPE mara-matnr,
           END OF ty_mara.
    DATA: w_index         TYPE                 sy-tabix    ,
          w_found(1)      TYPE                 c           ,
          w_t_j3abdsi     TYPE                 ty_t_j3abdsi,
          t_t_j3abdsi     TYPE        TABLE OF ty_t_j3abdsi,
          t_t_j3abdsi_tmp TYPE        TABLE OF ty_t_j3abdsi,
          t_mara          TYPE HASHED TABLE OF ty_mara
            WITH UNIQUE KEY matnr.
    * You will have to adjust the where clause on this select to pick the best index
    SELECT matnr
           aufnr
           posnr
           etenr
           werks
           j_3asize
           j_4krcat
           vdatu
           menge
           j_3aresm
      FROM j_3abdsi
      INTO TABLE t_t_j3abdsi
      WHERE matnr IN so_matnr
      AND   werks IN so_werks
      AND   vdatu IN so_vdatu.
    IF sy-subrc EQ 0.
      t_t_j3abdsi_tmp[] = t_t_j3abdsi[].
      SORT t_t_j3abdsi_tmp BY matnr.
      DELETE ADJACENT DUPLICATES FROM t_t_j3abdsi_tmp COMPARING matnr.
      SELECT matnr
        FROM mara
        INTO TABLE t_mara
        FOR ALL ENTRIES IN t_t_j3abdsi_tmp
        WHERE matnr EQ t_t_j3abdsi_tmp-matnr
        AND mtart   IN so_mtart.
      LOOP AT t_t_j3abdsi INTO w_t_j3abdsi.
        w_index = sy-tabix.
        AT NEW matnr.
          READ TABLE t_mara WITH KEY matnr = w_t_j3abdsi-matnr
                                     TRANSPORTING NO FIELDS.
          IF sy-subrc EQ 0.
            w_found = 'X'.
          ELSE.
            CLEAR w_found.
          ENDIF.
        ENDAT.
        IF w_found IS INITIAL.
          w_t_j3abdsi-del = 'X'.
          MODIFY t_t_j3abdsi FROM w_t_j3abdsi INDEX w_index
            TRANSPORTING
              del.
        ENDIF.
      ENDLOOP.
      DELETE t_t_j3abdsi WHERE del EQ 'X'.
    ENDIF.

  • Inner Join.

    I am using a Inner join statement. I dont see any problem in DEV but i see some problems in PMT. IT duplicating the records in the output. I see the same order twice.
    The statement is,
        SELECT plaf~plnum
               maranormt  plafmatnr
               makt~maktx                                      
               plafpwwrk  plafpaart  plaf~verid
               plafauffx  plafpsttr  plafgsmng plafplscn
          INTO TABLE t_plaf
          FROM plaf
         INNER JOIN mara
            ON plafmatnr EQ maramatnr
         INNER JOIN makt                                       
            ON maramatnr EQ maktmatnr                        
           FOR ALL entries IN t_mara
         WHERE plaf~matnr = t_mara-matnr.
    However i looked into the MAKT table. I see 2 descriptions for the same material no.
    I am assuming thats the problem.
    ANy suggestions.
    Ster.

    > Hello,
    >
    >  Check this code . I tried it now and it's working
    >
    >
    > Tables: plaf,mara,makt.
    >
    > Data: it_plaf type standard table of plaf.
    > data: it_mara type standard table of mara,
    >       it_makt type standard table of makt.
    > ct-options: s_plnum for plaf-plnum,
    >                 s_matnr for mara-matnr.
    > plaf into table it_plaf
    >          where plnum in s_plnum
    > and matnr in s_matnr.
    >
    > if it_plaf[] is not initial.
    >
    >    select * from mara into table it_mara
    >        for all entries in it_plaf
    >    where matnr = it_plaf-matnr.
    >  Select * from makt into table it_makt
    >          for all entries in it_plaf
    >  where matnr = it_plaf-matnr.
    >
    > endif.
    >
    > Loop at it_mara into wa_mara.
    > read table it_plaf into wa_plaf with key matnr =
    > wa_mara-matnr.
    > if sy-subrc = 0.
    > move-corresponding to wa_final.
    > endif.
    > read table it_makt into wa_makt witk key matnr =
    > wa_mara-matnr.
    > if sy-subrc = 0.
    > Move-corresponding to wa_final.
    > endif.
    > append wa_final to it_final.
    > clear: wa_mara,wa_plaf,wa_final.
    > endloop.
    >
    >
    > Regards,
    > Deepu.K
    It would be better for performance to use Field-Symbols -;)
    FIELD-SYMBOLS: <MARA> LIKE LINE OF IT_MARA.
    Loop at it_mara into <MARA>.
    *Process data....
    endloop.
    Greetings,
    Blag.

  • Inner join on four tables

    hi all,
    i am facing the problem with the inner join in the select query for 4 tables.
    can i use the inner join for tables in SAP 6.0 version,
    it is going to dump.
    here is my code
    SELECT DISTINCT apernr abegda aendda awagetype aamount acurrency
            altrctry brufnm banred bvorna bnachn cgroupcode d~vdsk1
    FROM pa9011 AS a INNER JOIN pa0002 AS b ON bpernr = apernr
                      INNER JOIN pa9013 AS c ON cpernr = bpernr
                      inner join pa0001 as d on dpernr = cpernr
                      INTO CORRESPONDING FIELDS OF TABLE it_bonus
    WHERE a~pernr IN s_pernr AND
           a~begda IN s_date AND
           a~subty EQ s_subty AND
           a~wagetype EQ wa_perbonus AND
           a~ltrctry = gc_ind AND
           a~amount > 0 AND
           b~endda = '99991231' AND
           c~groupcode IN s_loc AND
           c~endda = '99991231' and
           d~endda = '99991231'
        ORDER BY a~pernr.

    hi this is the dump ,
    In a SELECT access, the read file could not be placed in the target
    field provided.
    Either the conversion is not supported for the type of the target field,
    the target field is too small to include the value, or the data does not
    have the format required for the target field.

  • Doubt in Inner Join.

    Hi all,
    In a report program i have used a inner join. I am getting error in the where condition. Here I have furnished part of my code for ur reference.
    Tables : mara, makt, mard.
    data : begin of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    lgort like mard-lgort,
    labst like mard-labst,
    end of itab.
    parameters : matnr like mara-matnr.
    start-of-selection.
    select maramatnr maktmaktx mardlgort mardlabst into corresponding fields of iab from mara inner join maktx on maramatnr = maktmatnr inner join mard on maktmatnr = mardmatnr where matnr eq matnr.
    in the where condition I am getting the following error message.
    matnr has two meanings in data dictionary.
    Please help me in sort out this problem and also tell me more abt inner joins.
    thanks.

    HI,
    You can achieve this in two ways:
    1st:
    into corresponding fields of TABLE itab
    2nd:
    if you have inner join you don't need where any more at all! you already have connections.
    if you still need then use:
    tablename~fieldname
    for both sides!
    if in your example matnr from left side is local or global variable then you have problem with some naming conventions which usually are used in SAP.
    try 1st points at the beggining
    i'd write your select in this style
    Code:
             select mara~matnr
              makt~maktx
              mardlgort mardlabst
    into corresponding fields of table itab
    from ( mara
    inner join makt on maktmatnr = maramatnr
                   and makt~spras = sy-langu )
    inner join mard on mardmatnr = maramatnr.
    OR
        Code:
              select mara~matnr
              makt~maktx
              mardlgort mardlabst
    into corresponding fields of table itab
    from ( mara
    inner join makt on maktmatnr = maramatnr )
    inner join mard on mardmatnr = maramatnr
    where
            makt~spras = sy-langu.
    Cheers,
    Chandra Sekhar.

  • Alternate for inner join to improve performance

    Hi all,
    I have used an inner join query to fetch data from five different tables into an internal table with where clause conditions.
    The execution time is almost 5-6 min for this particular query(I have more data in all five DB tables- more than 10 million records in every table).
    Is there any alternate for inner join to improve performance.?
    TIA.
    Regards,
    Karthik

    Hi All,
    Thanks for all your interest.
    SELECT  a~object_id a~description a~descr_language
                a~guid AS object_guid a~process_type
                a~changed_at
                a~created_at AS created_timestamp
                a~zzorderadm_h0207 AS cpid
                a~zzorderadm_h0208 AS submitter
                a~zzorderadm_h0303 AS cust_ref
                a~zzorderadm_h1001 AS summary
                a~zzorderadm_h1005 AS summary_uc
                a~zzclose_date     AS clsd_date
                d~stat AS status
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.
                f~priority
                FROM crmd_orderadm_h AS a INNER JOIN crmd_link AS b ON  a~guid = b~guid_hi
                INNER JOIN crmd_partner AS c ON b~guid_set = c~guid
                INNER JOIN crm_jest AS d ON objnr  = a~guid
                INNER JOIN crmd_activity_h AS f ON f~guid = a~guid
                INTO CORRESPONDING FIELDS OF TABLE et_service_request_list
                WHERE process_type IN lt_processtyperange
                AND   a~created_at IN lt_daterange
                AND   partner_no IN lr_partner_no
                AND   stat IN lt_statusrange
                AND   object_id IN lt_requestnumberrange
                AND   zzorderadm_h0207 IN r_cpid
                AND   zzorderadm_h0208 IN r_submitter
                AND   zzorderadm_h0303 IN r_cust_ref
                AND   zzorderadm_h1005 IN r_trans_desc
                AND   d~inact = ' '
                AND   b~objtype_hi = '05'
                AND   b~objtype_set = '07'.

  • Are inner join and equijoin are same....?

    are inner join and equijoin are same....?

    WhiteHat wrote:
    interesting it says that - an equi join is a type of inner join but you can't really say they are the same thing.Simply said it it like this:
    Equi join means compare two tables where a value is in each table using an equal sign.
    An inner join means: We use the INNER JOIN keyword and have a join condition between the two tables.
    example1
    select *
    from emp
    inner join dept on emp.dept_no = dept.dept_no;This example is an inner join and also an equi join.
    example2
    select *
    from emp
    inner join dept on emp.dept_no >= dept.dept_no;This example is an inner join which is NOT an equi join.
    How to interpret the outcome is a different story (in this case it doesn't make much sense). However the syntax is correct and it is an inner join. But since it doesn't use the equal operator it is an non-equi join.

  • Program without inner join..

    hi frds...
    i need help in the programming without using the inner join and views,
    i want to take  data from 2  different table without join and views, give some sample codes or links
    it will help to us.
    by
    pari..
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 12:18 PM

    Hi pari,
             This is the sample code 'for all entries'
    in alv report.
    TYPE-POOLS:SLIS.
    DATA:BODY TYPE SLIS_T_FIELDCAT_ALV,
         HEADER TYPE SLIS_FIELDCAT_ALV.
    DATA:BEGIN OF ITAB OCCURS 0,
         MATNR LIKE MARA-MATNR,
         ERSDA LIKE MARA-ERSDA,
         MEINS LIKE MARA-MEINS,
         END OF ITAB.
    DATA:BEGIN OF ITAB1 OCCURS 0,
         MATNR LIKE MAKT-MATNR,
         MAKTX LIKE MAKT-MAKTX,
         END OF ITAB1.
    DATA:BEGIN OF ITAB2 OCCURS 0,
         MATNR LIKE MARA-MATNR,
         ERSDA LIKE MARA-ERSDA,
         MEINS LIKE MARA-MEINS,
         MAKTX LIKE MAKT-MAKTX,
        END OF ITAB2.
    SELECT-OPTIONS:SMATNR FOR ITAB-MATNR.
    PERFORM FETCH_MARA.
    PERFORM FETCH_MAKT.
    PERFORM READ.
    PERFORM FIELDCATALOG.
    PERFORM ALVDISPLAY.
    *&      Form  FETCH_MARA
    form FETCH_MARA .
    SELECT MATNR ERSDA MEINS FROM MARA INTO TABLE ITAB WHERE MATNR IN SMATNR
    endform.                    " FETCH_MARA
    *&      Form  FETCH_MAKT
    form FETCH_MAKT .
    IF ITAB[] IS NOT INITIAL.
    SELECT MATNR MAKTX FROM MAKT INTO TABLE ITAB1 FOR ALL ENTRIES IN ITAB
    WHERE MATNR = ITAB-MATNR.
    ENDIF.
    endform.                    " FETCH_MAKT
    FORM READ.
    LOOP AT ITAB.
    READ TABLE ITAB1 WITH KEY MATNR = ITAB-MATNR.
    IF SY-SUBRC = 0.
    MOVE ITAB-MATNR TO ITAB2-MATNR.
    MOVE ITAB-ERSDA TO ITAB2-ERSDA.
    MOVE ITAB-MEINS TO ITAB2-MEINS.
    MOVE ITAB1-MAKTX TO ITAB2-MAKTX.
    ENDIF.
    APPEND ITAB2.
    ENDLOOP.
    ENDFORM.
    *&      Form  FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    form FIELDCATALOG .
    HEADER-COL_POS = '1'.
    HEADER-SELTEXT_L = 'MATNR1'.
    HEADER-TABNAME = 'ITAB2'.
    HEADER-FIELDNAME = 'MATNR'.
    APPEND HEADER TO BODY.
    CLEAR HEADER.
    HEADER-COL_POS = '2'.
    HEADER-SELTEXT_L = 'ERSDA'.
    HEADER-TABNAME = 'ITAB2'.
    HEADER-FIELDNAME = 'ERSDA'.
    APPEND HEADER TO BODY.
    CLEAR HEADER.
    HEADER-COL_POS = '3'.
    HEADER-SELTEXT_L = 'MEINS'.
    HEADER-TABNAME = 'ITAB2'.
    HEADER-FIELDNAME = 'MEINS'.
    APPEND HEADER TO BODY.
    CLEAR HEADER.
    HEADER-COL_POS = '4'.
    HEADER-SELTEXT_L = 'MAKTX'.
    HEADER-TABNAME = 'ITAB2'.
    HEADER-FIELDNAME = 'MAKTX'.
    APPEND HEADER TO BODY.
    CLEAR HEADER.
    endform.                    " FIELDCATALOG
    *&      Form  ALVDISPLAY
    form ALVDISPLAY .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = 'ZALVREPORT'
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
       IT_FIELDCAT                    = BODY
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = ITAB2
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.

Maybe you are looking for

  • Oracle Forms10g Application

    Hi, Iam Working on Oracle Forms10g Developer Suite . In Forms6i if i ligin into application i will get the client host name and IP Address. In Case of Forms10g using webutil iam not able to get the same. Can any one tell us its very urgent Regards Ve

  • What is the maximum excel file size that can be converted to pdf?

    Currently I am trying to convert a excel file of 37 mb by using pdf generator. And it fails with the exception as java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space. Waiting someone help! T_T

  • GP + Web Dynpro (Interface o Application)+ Web Services

    Hi, I have a scenario, in which I require to create a web dynpro, which will be utilized in a Callable Object, inside GP.  This web dynpro will be like a form, which will be fed from 2 sources.  • An external Web Service, that brings information from

  • Going away for a month with no Macbook

    So, I'm going away for a month to Scotland/Europe and not able to take my Macbook Pro (13", late 2010 model, snow Leopard 10.6.8) because last time I took it, it broke and had to be fixed and I was only able to cause it was under warranty. So, I'm go

  • Export image to tif using cast image

    I have written a vi that currently acquires data from a camera. The image steams in continuously in 16bit. I have a case structure that snaps the image and exports a single frame of the streaming image to a tif format using "IMAQ Write TIFF file". Th