Does derived table use where clause fillters inside

dear all.
Table "A" has two cols aid and col1 , aid is pk.
Table "B" has two cols  bid , aid , and colb .
followin query can be formulated in other ways ,but i wanted to ask something about query processing.
select aid,aa.ca,aa.cb
from A
left join
(select aid, b.colb ca ,b1.colb  cb
 from A
left join B on a.aid=b.aid and b.colb='r'
left join B b1 on a.aid=b1.aid and b1.colb='e'
) aa
where a.aid (1,2)
i wanted to know if i put the where clause "where a.aid(1,2) in side derived table aa
then will it change its plan in any case or it is sufficant to put where clasue in last
or i should put the where clause in side the derive table "aa" also.
yours sincerley

Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
This is minimal polite behavior ON SQL forums. Is your boss this rude to you?? 
CREATE TABLE Alphas
(alpha_id INTEGER NOT NULL PRIMARY KEY,
 col1 INTEGER NOT NULL);
Thanks to your rude, poor narrative I have to guess about the second table: 
CREATE TABLE Betas
(beta_id INTEGER NOT NULL PRIMARY KEY, 
 alpha_id INTEGER NOT NULL
   REFERENCES Alphas(alpha_id), 
 colb CHAR(1) NOT NULL);
Your query is awful. OUTER JOINs are rare in a properly designed schemA. The DRI should guarantee inner joins!  We seldom need to re-name columns. 
>> I wanted to know if I put the where clause WHERE A.alpha_id(1,2) in side derived table aa <<
That is not a syntactically invalid search condition; did you mean 
“WHERE A.alpha_id IN (1,2)” ??
Why did you de-normalize your results? My guess is that you can get the same data with this: 
SELECT alpha_id, colb
  FROM Betas AS B
 WHERE colb IN ('r', 'e')
   AND alpha_id IN (1, 2);
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL

Similar Messages

  • Can we use where clause in Update on Merge statement?

    Hi All,
    I tried to execute the following Merge Query:
    When this query is executed without ‘Where clause’ in Update statement its working fine. When executed with ‘Where clause’ it throwing the following error:
    ORA-00905: missing keyword.
    Following is the sample query which I tried to execute:
    MERGE INTO TABLE_NAME
    USING (SELECT COLUMN FORM TABLES)
    ON (CONDITION)
    WHEN MATCHED THEN
    UPDATE SET
         COLUMN UPATES
    WHERE CONDITION -- Can we use where clause here?
    WHEN NOT MATCHED THEN
    INSERT
    INSERT VALUES;
    Can some one help on this?
    Thanks in advance.
    Darius

    Yes:
    SQL> drop table emp1;
    Table dropped.
    SQL> create table emp1 as select * from emp where deptno = 30;
    Table created.
    SQL> update emp1 set sal = sal*2;
    6 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER           3000
    JAMES            1900
    6 rows selected.
    SQL> MERGE INTO emp1
      2  USING(select * from emp) emp
      3  ON (emp1.empno = emp.empno)
      4  WHEN MATCHED THEN
      5  UPDATE SET sal = emp.sal WHERE ename = 'TURNER'
      6  WHEN NOT MATCHED THEN
      7  INSERT(ename,sal) VALUES(emp.ename,emp.sal);
    9 rows merged.
    SQL> select ename,sal from emp1;
    ENAME             SAL
    ALLEN            3200
    WARD             2500
    MARTIN           2500
    BLAKE            5700
    TURNER 1500
    JAMES            1900
    SMITH             800
    JONES            2975
    CLARK            2450
    SCOTT            3000
    KING             5000
    ENAME             SAL
    ADAMS            1100
    FORD             3000
    MILLER           1300
    14 rows selected.
    SQL> SY.

  • How to Get the required List Item values by using Where Clause

    I have two tables named "TAX_RULES","BILL"
    1. " Tax_Rules" (Sub_Head_Code,Tax_ID,Tax_Percentage)
    { While "Sub_Head_Code" field is unique,
    Tax_ID describes that there are two kinds of Tax_IDs based on Tax_percentage which is 6% for some Sub_Head_Codes and 3.5% for the remainng Sub_Head_Codes. I have given Tax_ID 1 for 6% and Tax_ID 2 for Sub_Head_codes having 3.5%. }
    2. "BILL" (Bill_ID,Sub_Head_Code,Tax_ID,Bill_Amount)
    {While "Bill_ID" describes unique Bill Identification Number,
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table}
    I have design form for both tables.
    In BILL form i am trying to get values of Tax_ID from Tax_Rules table at run-time by using WHEN-NEW-FORM-INSTANCE.
    For this whenever i select a Sub_Head_Code in Bill Form, all the Tax_IDs that i have recorded against each Sub_Head_Code which is either 1 or 2 against 6% and 3.5% respectively.
    But I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code ahould come in the LIST ITEM.
    I have used WHERE clause but that is useless.
    Following is the Code that i have applied in the WHE-NEW-ITEM-INSTANCE Trigger at FORM LEVEL
    <CODE>
    DECLARE
         rg_n1 VARCHAR2(40) :='TAX_ID';
         rg_idn1 RecordGroup;
         gc_idn1 GroupColumn;
         errcode NUMBER;
    BEGIN
         CLEAR_LIST('BILL.TAX_ID');
         rg_idn1 := Find_Group(rg_n1);
    IF      Id_Null(rg_idn1) then
              rg_idn1 := Create_Group(rg_n1);
         gc_idn1 := Add_Group_Column(rg_idn1,'EXPLAIN',CHAR_COLUMN,60);     
              gc_idn1 := Add_Group_Column(rg_idn1,'TAX_ID',CHAR_COLUMN,3);
         END IF;
         errcode := Populate_Group_With_Query(rg_idn1,'select TAX_ID,TAX_ID from TAX_RULES');
         POPULATE_LIST('BILL.TAX_ID',RG_IDn1);
    END;
    </CODE>

    In the Tax Rules table, you state:
    "Sub_Head_Code" field is unique
    In the Bill table, you state:
    Sub_Head_Code and Tax_ID are behaving like composite foreign key from Tax_Rules table
    If the Sub_Head_Code is unique, then it's acting as a primary key, so Sub_Head_Code and Tax_ID in the Bill table are not behaving like a composite foreign key. The Sub_Head_Code is a foreign key, and the Tax_ID is irrelevant as far as keys are concerned.
    It is not clear what it is you want to do.
    If you want to display the Tax_IDs from the Bill table when you select a Sub_Head_Code from the Tax_Rules table, then change your query to:
    select TAX_ID, TAX_ID from BILL where Sub_Head_Code = :Tax_Rules.Sub_Head_Code
    If you want to display the Tax_IDs from the Tax_Rules table when you select a Sub_Head_Code from the Bill table, then change your query to:
    select TAX_ID, TAX_ID from TAX_RULES where Sub_Head_Code = :Bill.Sub_Head_Code
    If this is not what you want, then clarify what it is you want to do. Don't say:
    "I want that whenever i select a "Sub_Head_Code", Only that Tax_ID which is associated with that Sub_Head_Code"
    because it is not clear what tables you are referring to.

  • Performance hit using "where" clause in the query

    Hi All,
    I am facing a huge performance hit in the java code when using "where" clause in queries. Following are the details:
    1. SELECT * FROM Employee
    2. SELECT * FROM Employee where employeeid in (26,200,330,571,618,945)
    There is no difference in Query Execution Time for both queries.
    Business Logic Time is huge in second case as compared to first one (ratio - 1:20).
    Rows returned are more in first case as compared to second case.(ratio - 1:4)
    Business Logic is same for both the cases where I iterate through the ResultSet, get the objects and set them in a data structure.
    Does anybody know the reason of unexpected time difference for the business logic in the second case?

    Since you're mentioning clustering your index, I'll assume you are using Oracle. Knowing what database you are using makes it a lot easier to suggest things.
    Since you are using Oracle, you can get the database to tell you what execution plan it is using for each of the 2 SQL statements, and figure out why they have similar times (if they do).
    First, you need to be able to run SQL*Plus; that comes as part of a standard database installation and as part of the Oracle client installation - getting it set up and running is outside the scope of this forum.
    Second, you may need your DBA to enable autotracing, if it's not already:
    http://asktom.oracle.com/~tkyte/article1/autotrace.html
    http://www.samoratech.com/tips/swenableautotrace.htm
    Once it's all set up, you can log in to your database using sql*plus, issue "SET AUTOTRACE ON", issue queries and get execution plan information back.
    For example:
    SQL> set autotrace on
    SQL> select count(*) from it.ticket where ticket_number between 10 and 20;
      COUNT(*)
            11
    Execution Plan
    Plan hash value: 2983758974
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            |     1 |     4 |     1   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE   |            |     1 |     4 |            |          |
    |*  2 |   INDEX RANGE SCAN| TICKET_N10 |    12 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("TICKET_NUMBER">=10 AND "TICKET_NUMBER"<=20)
    Statistics
              0  recursive calls
              0  db block gets
              1  consistent gets
              0  physical reads
              0  redo size
            515  bytes sent via SQL*Net to client
            469  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> This tells me that this query used an INDEX RANGE SCAN on index TICKET_N1; the query can't do much better than that logically... In fact, the statistic "1 consistent gets" tells me that Oracle had to examine only one data block to get the answer, also can't do better than that. the statistic, "0 physical reads" tells me that the 1 data block used was already cached in Oracle's memory.
    the above is from Oracle 10g; autotrace is available back to at least 8i, but they've been adding information to the output with each release.
    If you have questions about sql_plus, check the forums at asktom.oracle.com or http://forums.oracle.com/forums/category.jspa?categoryID=18
    since sql*plus is not a JDBC thing...
    Oh, and sql*plus can also give you easier access to timing information, with "set timing on".

  • In which order does the query's where clause condition is checked

    Hi All,
    can anyone tell me in which order does oracle evaluate the where clause condition?
    for ex: select * from users where user_type='Admin' and stauts='Enabled'

    user9981103 wrote:
    The conditions in the WHERE clause are checked in the reverse order of the given order.
    i.e; first it will check stauts='Enabled'* and then user_type='Admin'* for your given queryWhy do you believe that?
    If there is a sufficiently selective b-tree index on USER_TYPE, the optimizer would undoubtedly use that index to process the USER_TYPE = 'Admin' condition and then check the STATUS column.
    If there is a sufficiently selective b-tree index on STATUS, the optimizer would undoubtedly use that index to process the STATUS='Enabled' condition and then check the USER_TYPE column.
    If there is a composite b-tree index on (STATUS, USER_TYPE), the optimizer would use that index to process the two conditions nearly simultaneously, though technically the leading column of the index is evaluated first. Of course, if you reverse the order of columns in the index, you get a different evaluation order
    If there are bitmap indexes on STATUS and USER_TYPE, Oracle can combine the two indexes and evaluate the two conditions simultaneously.
    And that is leaving out tons of query plan options and other optimizer wrinkles.
    Justin

  • How to use WHERE Clause in BPEL

    Hi ,
    i am trying to use where clause in DB adapter but its not working.
    my query is "select empname from employee where empid = &a"
    can any body tell me what is the reason its npt working?
    and how can i retrive data form DB?

    Hi,
    You are thinking perfectly fine. The solution what I suggested was
    select ename from emp where empno=?
    And the solution provided by you was
    SELECT first_name, last_name FROM per_all_people_f WHERE person_id = #p_person_id
    There is no problem with the above mentioned select statements.
    I just want to say that if you see closely, internal logic changes #parameter name to ?. So both the logics are right.
    Cheers,
    Abhi...

  • Query using where clause

    I am not able to run a SQL query using where clause.
    the query is as follows:
    I extract the text input by the user in a text field say 'a' and
    store it in string 'y'.
    String y= a.getText();
    //running the query
    Select A from B where B.x=y;
    how do we run a where clause when y is a string variable instead of value?

    Use the following :
    String y = a.getText();
    String query ="select A.CODE from Port A where A.NAME=" + "'" + y + "'" ;
    ResultSet rs= stmt.executeQuery(query);

  • Using where clause in Fetch Row from table

    Hello,
    I call Page2 from Page1, I pass PK1 to Page2.
    In the section Fetch Row from Table2, I write a Where clause ( FK2 = : PK1). I have data in Table2 with FK = PK1, but I cant view the data in Page2.
    Where is the error?
    Thanks for help.

    please recreate the problem in apex.oracle.com
    please create a developer account so that you don't give your email to all the spam-bots.
    MK

  • Using where clause  with like

    Hi all,
    im trying to set a block default where clause in the pre-query trigger of my block "customer_settlement" , to query the records that exist in a customers table like this, where the customer_name is variable based on the value entered by the user in enter-query mode before hitting the F8 key , the statement is :
    set_block_property( 'customer_settlement' , default_where ,
    ' fk_cust_code in ( select customer_code from customers where customer_name like %' || :customer_settlement.customer_name ||'% )' );
    the query doesnt work and giving me an error " unable to perform query" , notice that :customer_settlement.customer_name is an item in the block , the user change it and would like to query upon it , and its not a base table item on customer_settlement block its on customers table only . I tried all combinations of '%' and || but it seems that oracle can't see the value In the customer_name field.
    any help is highly thanked.
    im using Oracle form 9.0.4 and Oracle 10g Db.
    Regards,
    IKQ

    Hi,
    does this work ?
    set_block_property( 'customer_settlement' , default_where ,
    ' fk_cust_code in ( select customer_code from customers where customer_name like '''%' || :customer_settlement.customer_name ||'%''' )' );
    Frank

  • How to use "where" clause in modify statement

    Hi
    can any1 telll me is it possible to use a where clause in a modify statemetn. I want to use modify statemetn  to insert a new recoed in a database table.
    Regards
    Sabahuddin Ahmed

    MODIFY itab - itab_lines
    Syntax :
    ... itab FROM wa TRANSPORTING comp1 comp2 ... WHERE log_exp.
    With these additions the MODIFY statement assigns the content of the comp1 comp2 ... components of the wa work area specified after TRANSPORTING to all lines in the itab table that meet the logical condition log_exp. The wa work area must be compatible with the line type of the internal table.
    The TRANSPORTING addition has the same effect as changing individual lines. The WHERE addition can only be specified together with the TRANSPORTING addition. After WHERE, any logical expression can be specified in which the first operand of each individual comparison is a component of the internal table. All logical expressions are therefore possible, with the exception of IS ASSIGNED, , and IS SUPPLIED. It is not possible to dynamically specify a component using bracketed character-type data objects.
    While for standard tables and hashed tables all lines in the internal table are checked for the logical expression of the WHERE statement, for sorted tables, optimized access can be achieved by checking at least one opening part of the table key for parity using AND linked queries in the logical expression.
    Example
    Change the contents of the planetype component for all lines in the sflight_tab internal table in which this component contains the value p_plane1 to the value p_plane2.
    PARAMETERS: p_carrid TYPE sflight-carrid,
                p_connid TYPE sflight-connid,
                p_plane1 TYPE sflight-planetype,
                p_plane2 TYPE sflight-planetype.
    DATA sflight_tab TYPE SORTED TABLE OF sflight
                     WITH UNIQUE KEY carrid connid fldate.
    DATA sflight_wa TYPE sflight.
    SELECT *
           FROM sflight
           INTO TABLE sflight_tab
           WHERE carrid = p_carrid AND
                 connid = p_connid.
    sflight_wa-planetype = p_plane2.
    MODIFY sflight_tab FROM sflight_wa
           TRANSPORTING planetype WHERE planetype = p_plane1.
    reward if useful

  • Readonly table with where clause value from previous page

    Hi
    I am using jdeveloper 10.1.3.
    I have a globalhome page where the user enteres a reference number. i have a backing bean for the globalhome page that runs a method to run an sql that seraches for this reference number, if the reference number exsits the user is directed to a detail page.
    this detail page should display details of this reference number.
    i have set up a read only table to display this data based on a view object with a bind varaible in the where clause.
    however i am unsure how to set this bind varaible value to the reference entered in the first globalhome page.
    please can anyone advise how to do this.
    regards

    Hi,
    You can follow following steps to achieve this
    1) Write a custom method in your Application module like
    public void executeMyVO(String bindVarValue)
    MyVOImpl vo= getMyVo();
    vo.setNamedWhereClauseParam(<bind variable name decalred in VO>,bindVarValue);
    vo.execute();
    2) Expose the above method to client. (Right click AM-->Client-->Shift method from left to right)
    3) In the pagedef of globalhome page, create a method action for the aboce created custom method
    4) execute the method action from your backing bean after you run an sql that seraches for this reference number.
    Hope this help.
    Vikram

  • Is `WHERE` clause pointless inside a sub-select?

    WHERE is part of the definition of a sub-select:
    [WITH [<calc-clause> ...]]
    SELECT [<axis-spec> [, <axis-spec> ...]]
    FROM [<identifier> | (< sub-select-statement >)]
    [WHERE <slicer>]
    [[CELL] PROPERTIES <cellprop> [, <cellprop> ...]]
    < sub-select-statement > :=
    SELECT [<axis-spec> [, <axis-spec> ...]]
    FROM [<identifier> | (< sub-select-statement >)]
    [WHERE <slicer>]I understand that a subselect does not reduce dimensionality or set context.
    If overall context of a script is not driven via a sub-select then is there ever a point in using this WHERE clause in the subselect? 
    An example in Adventure Works:
    SELECT
    [Measures].[Order Count] ON 0
    [Geography].[Country] * [Product].[Category] ON 1
    FROM
    SELECT
    [Geography].[Country].[Australia] ON 0
    FROM [Adventure Works]
    WHERE
    [Product].[Category].[Bikes]

    Hi WhyTheQ,
    According to your description, you want to know if the Where clause is working when the main select statement is not driven via the sub-select. Right?
    In MDX, Where clause is used for defining slicer axis so that only the data intersecting the with the specified member will be returned. It will work in the sub-select to restrict the data. However, the return result from sub-select should match
    the set on your axis. In this scenario, your sub-select returns an aggregation value of a dimension member, but in your main select row level expects a tuple set. So your can't get the result and it will throw error.
    Reference:
    Specifying the Contents of a Slicer Axis (MDX)
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How to use where clause with get statement in LDB programs

    Hi All,
    I am using logical databse in my report program.I am not getting how to use the where clause in the get statement is it possible to use?or if not possible only option is we should filter it after get statment is right?Can you please some body throw some idea on this?
    Regards
    Mahesh

    Hi,
    Reffer these links
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    reward if helpful
    Thanks,
    Suma.

  • Using where clause with cast multiset

    version
    oracle 10g
    how to select values based on values in the object.
    CREATE OR REPLACE TYPE init_queue AS OBJECT (
       seq_num_q                 NUMBER,
       source_system_name        VARCHAR2 (50 BYTE),
       milestone_id              NUMBER,
       milestone_date            DATE,
       downstream_order_number   VARCHAR2 (175 BYTE),
       leg_id                    VARCHAR2 (175 BYTE),
       statuspro_captured_date   DATE,
       pon                       VARCHAR2 (26 BYTE),
       milestone_source          VARCHAR2 (26 BYTE),
       session_id                NUMBER,
       reconfirmation_flag       CHAR (1 BYTE),
       vec_flag                  CHAR (1 BYTE)
    CREATE OR REPLACE TYPE tab_init_queue AS TABLE OF init_queue;
    SET serveroutput on;
    DECLARE
       v_list       tab_init_queue := tab_init_queue ();
       v_arr_sort   tab_init_queue := tab_init_queue ();
    BEGIN
       SELECT init_queue (seq_num_q,
                          source_system_name,
                          milestone_id,
                          milestone_date,
                          downstream_order_number,
                          leg_id,
                          statuspro_captured_date,
                          pon,
                          milestone_source,
                          session_id,
                          reconfirmation_flag,
                          vec_flag
       BULK COLLECT INTO v_list
         FROM r_cust_status_init_queue;
       SELECT CAST (MULTISET (SELECT *
                                FROM TABLE (v_list)
                               WHERE v_list.milestone_id = 11  -- * How to select values based on milestone.*
                               ) AS tab_init_queue)
         INTO v_arr_sort
         FROM DUAL;
       DBMS_OUTPUT.put_line (v_arr_sort.COUNT);
    END;
    /Edited by: new learner on Aug 23, 2010 7:35 PM

    new learner wrote:
    version
    oracle 10g
    how to select values based on values in the object.
    CREATE OR REPLACE TYPE init_queue AS OBJECT (
    seq_num_q                 NUMBER,
    source_system_name        VARCHAR2 (50 BYTE),
    milestone_id              NUMBER,
    milestone_date            DATE,
    downstream_order_number   VARCHAR2 (175 BYTE),
    leg_id                    VARCHAR2 (175 BYTE),
    statuspro_captured_date   DATE,
    pon                       VARCHAR2 (26 BYTE),
    milestone_source          VARCHAR2 (26 BYTE),
    session_id                NUMBER,
    reconfirmation_flag       CHAR (1 BYTE),
    vec_flag                  CHAR (1 BYTE)
    CREATE OR REPLACE TYPE tab_init_queue AS TABLE OF init_queue;
    SET serveroutput on;
    DECLARE
    v_list       tab_init_queue := tab_init_queue ();
    v_arr_sort   tab_init_queue := tab_init_queue ();
    BEGIN
    SELECT init_queue (seq_num_q,
    source_system_name,
    milestone_id,
    milestone_date,
    downstream_order_number,
    leg_id,
    statuspro_captured_date,
    pon,
    milestone_source,
    session_id,
    reconfirmation_flag,
    vec_flag
    BULK COLLECT INTO v_list
    FROM r_cust_status_init_queue;
    SELECT CAST (MULTISET (SELECT *
    FROM TABLE (v_list)
    WHERE v_list.milestone_id = 11  -- * How to select values based on milestone.*
    ) AS tab_init_queue)
    INTO v_arr_sort
    FROM DUAL;
    DBMS_OUTPUT.put_line (v_arr_sort.COUNT);
    END;
    /Edited by: new learner on Aug 23, 2010 7:35 PMLike this.
    DECLARE
       v_list       tab_init_queue := tab_init_queue ();
       v_arr_sort   tab_init_queue := tab_init_queue ();
    BEGIN
       v_list.extend;
       v_list(v_list.count) := init_queue(1, '1', 11, sysdate, '1', '1', sysdate, '1', '1', 1, '1', '1');
      8 
       SELECT CAST (MULTISET (SELECT *
                                FROM TABLE (v_list)
                               WHERE milestone_id = 11  -- * How to select values based on milestone.*
                               ) AS tab_init_queue)
         INTO v_arr_sort
         FROM DUAL;
       DBMS_OUTPUT.put_line (v_arr_sort.COUNT);
    END;
    1
    PL/SQL procedure successfully completed.
    ME_XE?ME_XE?
    ME_XE?select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    5 rows selected.
    ME_XE?It would have been easier if you'd made a simple example so i didn't have to type out the example record (since your original code referenced a table you didn't provide DDL and INSERTS for).
    Something to keep in mind for the future (the easier you make it for us, the more likely we are to help).

  • Using for all entries of two internal tables in where clause of the select

    Hi experts,
    My requirement is, need to select Marc-minbe and wrpl-sobst, for all the entries of the two internal tables it_mara , and it_t001w.
    here is the select queries i have used,
    select matnr normt from  mara into it_mara for all entries in it_data where normt = it_data-normt.
    select konnr werks from t001w into it_t001w for all entries in it_data where konnr = it_data-konnr.
    now i need to select minbe of marc table and sobse of wrpl table for all the entries of above internal tables, it_mara and it_t001w, using both matnr of it_mara and werks of it_t001w in where condition.
    Pls advise how i can do it.
    Thanks.
    Moderator message: very basic, please work on this yourself first, these forums are not a substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 6, 2010 9:38 AM

    Hi
    call SE16 with table TFTIT in order to get a full list (it will be long...)
    A list of FMs with parameters can be found in table FUNCT.
    Finally go to sm37rsdf4
    that will give you all the function modules with description
    Here is the list:
    http://www.erpgenie.com/abap/functions.htm
    hope this helps...
    Regards
    CSM Reddy

Maybe you are looking for