How to select data with multiple child nodes

We have the following data:
me table ei table
m1 e1
m1 e2
m1 e3
m1 e4
m2 e5
m2 e6
m3 e7
m3 e8
I would like to display them as:
m1 e1
e2
e3
e4
m2 e5
e6
m3 e7
e8
How to best do this with sql?
I would like to produce this list with sql and then transform it to xml.
Thanks.

Since you did not use tags it is not clear what results should be:
SQL> WITH TBL AS (
  2  SELECT 'm1' me, 'e1' ei FROM DUAL UNION ALL
  3  SELECT 'm1' me, 'e2' ei FROM DUAL UNION ALL
  4  SELECT 'm1' me, 'e3' ei FROM DUAL UNION ALL
  5  SELECT 'm1' me, 'e4' ei FROM DUAL UNION ALL
  6  SELECT 'm2' me, 'e5' ei FROM DUAL UNION ALL
  7  SELECT 'm2' me, 'e6' ei FROM DUAL UNION ALL
  8  SELECT 'm3' me, 'e7' ei FROM DUAL UNION ALL
  9  SELECT 'm3' me, 'e8' ei FROM DUAL
10  )
11  SELECT  CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN ME ELSE NULL END ME,
12          EI
13    FROM  TBL
14    ORDER BY TBL.ME,
15             TBL.EI
16  /
ME EI
m1 e1
   e2
   e3
   e4
m2 e5
   e6
m3 e7
   e8
8 rows selected.or
SQL> WITH TBL AS (
2 SELECT 'm1' me, 'e1' ei FROM DUAL UNION ALL
3 SELECT 'm1' me, 'e2' ei FROM DUAL UNION ALL
4 SELECT 'm1' me, 'e3' ei FROM DUAL UNION ALL
5 SELECT 'm1' me, 'e4' ei FROM DUAL UNION ALL
6 SELECT 'm2' me, 'e5' ei FROM DUAL UNION ALL
7 SELECT 'm2' me, 'e6' ei FROM DUAL UNION ALL
8 SELECT 'm3' me, 'e7' ei FROM DUAL UNION ALL
9 SELECT 'm3' me, 'e8' ei FROM DUAL
10 )
11 SELECT CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN ME ELSE EI END ME,
12 CASE ROW_NUMBER() OVER(PARTITION BY ME ORDER BY EI) WHEN 1 THEN EI ELSE NULL END EI
13 FROM TBL
14 ORDER BY TBL.ME,
15 TBL.EI
16 /
ME EI
m1 e1
e2
e3
e4
m2 e5
e6
m3 e7
e8
8 rows selected.
SQL>
SY.

Similar Messages

  • How to select data into multiple bind variables

    Hi,
    I need to load data into multiple bind variable how to do that
    As of now i am using this
    select a , b into :a, :b from dual
    But i want even a to be loaded into both :a and :c also b to be loaded into :b and :d Please suggest
    Thanks
    Sudhir.

    Thanks much it worked
    Thanks
    Sudhir

  • How to select data from multiple dropdowns(HTMLDB)

    Hi,
    How to get the data from multiple dropdowns in the same report. Both the dropdowns are gerring data from the same table.
    Ex:
    abc-1st dropdown
    pqr-2nd dropdown.
    when abc and pqr are blank, it should display all records by default. If abc="some value" and pqr is empty then it should display all values corresponding to abc.
    Regards,
    Pallavi

    Pallavi,
    I think this might be something you are looking for:
    http://htmldb.oracle.com/pls/otn/f?p=31517:99
    There are some examples on how to modify your SQL to get it working the way you want.
    Denes Kubicek

  • How to search data with multiple parameters =SESSION

    Dear Günter Schenk
    Please help
    I have two Tables with many fields
    1.       tbl_users
    2.       tbl_transection
    Now problem is that I want when user login he make search in " tbl_usr_transection " related its own Transactions other then he view all user data
    I have one column about user in transaction table i.e. "fld_transection_by"
    I am using SESSION to filter all transaction its related user and its working fine.
    <?php echo $_SESSION['login_id']; ?>=<?php echo $row_rstbl_transections[' fld_transection_by ']; ?>
    Now how to make search from filter rows in many field
    Please explain in detail
    Thanks in Advance

    Hi, It sounds like you need to carry those variables into your mySQL statement.

  • How To Select Range With Multiple Tracks

    Hi,
    Is there a way to set an In point within a large reel, and then set an outpoint so I can then select everything within that range to copy? 
    The Range Selection Tool is sort of useless here, as it only selects the Video track, not the V2 (above it) or audio tracks below it.
    I especially need an option like this, for when I have a feature film all on one Reel, and then need to grab selections of it (each about 20 mins long) to copy and paste into their own separate reels.  But using the click and drag option can be a nightmare sometimes, and you very frequently miss clips above and below the Video track.
    Any help would be appreciated.
    Thanks!

    Hi Tom,
    That creates the same problem though:  In the Timeline Index, I can select either video, or audio, or titles.  But not all 3 at the same time.  I'm trying to create a range over all three of those elements... and quite a wide range.
    I seem to recall Final Cut 7 having a way to set the Slider tool, and then click an option that said, "Select all media to the right."

  • How to store multiple child nodes using dbms_xmlstore

    Hi,
    I'm using oracle 10g environment. In DBMS_XMLSTORE package I cannot able to insert the multiple child node value into db table.
    Here I have given the xml value
    <DATAPACKET REQUEST-ID="10001094">
      <HEADER>
        <SEARCH-RESULT-LIST>
          <SEARCH-RESULT-ITEM NAME="Ra-Al-Gul" CONFIDENCE-SCORE="750" BUREAU-ID="893991307899440">
            <IDENTIFIERS>
              <IDENTIFIER IDSOURCE="0001" MATCHED="TRUE"/>
            </IDENTIFIERS>
            <SURROGATES>
              <SURROGATE ID="CH0001" MATCHED="TRUE"/>
              <SURROGATE ID="CH0002" MATCHED="TRUE"/>
              <SURROGATE ID="CH0003" MATCHED="TRUE"/>
            </SURROGATES>
          </SEARCH-RESULT-ITEM>
        </SEARCH-RESULT-LIST>
      </HEADER>
    </DATAPACKET>for this xml data I have created the below table structure
    -- Table create script
    CREATE TABLE xml_insert (datapacket t_response );
    /* Type creation  code  */
    CREATE OR REPLACE TYPE t_response AS OBJECT
      "@REQUEST-ID" VARCHAR2(100),
      header        t_resp_header
    CREATE OR REPLACE TYPE t_resp_header AS OBJECT
      "SEARCH-RESULT-LIST"    t_search_item
    CREATE OR REPLACE TYPE t_search_item AS OBJECT
    ("SEARCH-RESULT-ITEM"      t_search_list);
    CREATE OR REPLACE TYPE t_search_list AS OBJECT
    ("@NAME"           VARCHAR2(300),
    "@CONFIDENCE-SCORE"      VARCHAR2(300),
    "@BUREAU-ID"           VARCHAR2(300),
    IDENTIFIERS           t_search_identifiers,
    SURROGATES           t_search_surrogates
    CREATE OR REPLACE TYPE t_search_identifiers AS OBJECT
    (IDENTIFIER           t_search_IDENTIFIER);
    CREATE OR REPLACE TYPE t_search_identifier AS OBJECT
      "@IDSOURCE"           VARCHAR2(20),
      "@MATCHED"           VARCHAR2(20)
    CREATE OR REPLACE TYPE t_search_surrogates AS OBJECT
    (SURROGATE           t_search_SURROGATE);
    CREATE OR REPLACE TYPE t_search_surrogate AS OBJECT
    "@ID"                VARCHAR2(20),
    "@MATCHED"           VARCHAR2(20)
    CREATE OR REPLACE TYPE tb_search_surrogate AS TABLE of t_search_SURROGATE;
    /and run this block
      DECLARE
      insCtx DBMS_XMLStore.ctxType;
      rows NUMBER;
      xmldoc CLOB :=
    <ROWSET>
    <ROW>
    <DATAPACKET REQUEST-ID="Q10001094">
      <HEADER>
        <SEARCH-RESULT-LIST>
          <SEARCH-RESULT-ITEM NAME="Anis kulam" CONFIDENCE-SCORE="750" BUREAU-ID="893991307899440">
            <IDENTIFIERS>
              <IDENTIFIER IDSOURCE="0001" MATCHED="TRUE"/>
            </IDENTIFIERS>
            <SURROGATES>
              <SURROGATE ID="CH0001" MATCHED="TRUE"/>
              <SURROGATE ID="CH0002" MATCHED="TRUE"/>
              <SURROGATE ID="CH0003" MATCHED="TRUE"/>
            </SURROGATES>
          </SEARCH-RESULT-ITEM>
        </SEARCH-RESULT-LIST>
      </HEADER>
    </DATAPACKET>
    </ROW>
    </ROWSET>';
    BEGIN
      insCtx := DBMS_XMLStore.newContext('xml_check');
      rows := DBMS_XMLStore.insertXML(insCtx, xmlDoc);
      DBMS_XMLStore.closeContext(insCtx);
    END;I got the following error
    Error Messgae :
    ORA-19031: XML element or attribute SURROGATE does not match any in type DOHADEV.T_CRB_SEARCH_SURROGATES
    ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
    ORA-06512: at line 28

    Hi,
    A couple of comments to begin with :
    - Your setup script, test case and error message are not consistent with each other.
    - You've not chosen the easiest road with DBMS_XMLSTORE and nested objects. As pointed out in a previous thread of yours, the whole thing would be far more simple with XMLTable.
    Do you really need to store the data in an object-relational structure at the end, or do you intend to further break it down into relational rows and columns?
    Do you have an XML schema?

  • How to create parameter with multiple selection in a query (SQ02) ?

    Hi Exports
    Do you know how to create parameter with multiple selection in a query (transaction SQ02)?
    thanks.

    Hi
    i know how to create user parameter at SQ02,
    the question is how to create multiple selection parameter?

  • EXTRACTVALUE + MULTIPLE CHILD NODES

    Hi,
    I have a XML Doc where I have multiple nodes in a tag and I need to extract the data using extractvalue funtion.
    My XMLtype doc stores a xml doc in this form:
    <CYKDoc xmlns="CYKdocument.bankxyz.com">
    <CYK>
    <gci>12345678</gci>
    <system>LION</system>
    <recordType>1</recordType>
    <CYKId>987654</CYKId>
    <policyVersion>DDL 1.0</policyVersion>
    </CYK>
    <CYKResponse>
         <id>q_grid</id>
         <grid>
         <data>
         <dataRow>
         <dataColumn>
         <id>q_grid_id</id>
         <name>q_grid_id</name>
         <codes>
         <code>704</code>
         </codes>
         </dataColumn>
         <dataColumn>
         <id>q_owner_type</id>
         <name>q_owner_type</name>
         <codes>
         **<code>IN</code>**
    **     <code>OUT</code>**
    **     <code>BETWEEN</code>**
         </codes>
         <catName>ben_owner_type</catName>
         </dataColumn>
         </dataRow>
         </data>
         </grid>
         </CYKResponse>
         </CYKResponses>
    </CYKDoc>
    In the above XML, I have a tag of name "q_owner_type" which has multiple child nodes..but I am not able to fetch the codes of any tag at all..
    My Query is :
    SELECT CYK_id,q_id,code,catname
         FROM ((SELECT p.CYK_id CYK_id,
         EXTRACTVALUE (VALUE (tab1), 'dataColumn/id') q_id,
         EXTRACTVALUE(VALUE(tab2), '/code') AS code,
         EXTRACTVALUE (VALUE (tab1),
         'dataColumn/catName'
         ) catname
         FROM CYK.CYK_doc p,
         TABLE
         (XMLSEQUENCE
         (EXTRACT
         (p.CYK_doc, '/CYKDoc/CYKResponses/CYKResponse[id="q_grid"]/grid/data/dataRow[1]/dataColumn'))) tab1,
         TABLE (XMLSEQUENCE (EXTRACT (VALUE (tab1), 'dataColumn/codes/code'))) tab2
         )) a
    WHERE a.CYK_id = 227209;
    I get 4 rows having one question as q_grid_id and 3 questions as q_owner_type but the extractvalue( tab2) doesnt fetch the values of codes....
    I am assuming that its an issue with XPATH I mentioned in alias tab2 but How else to handle it, is an issue here...
    If In TABLE (XMLSEQUENCE (EXTRACT (VALUE (tab1), 'dataColumn/codes/code'))) tab2 I refer the path only till codes, it errors out with saying that "single row fetches multiple records" because there are multiple child records..
    How to handle this??
    Please HELP
    Thanks
    Mahesh

    Hi,
    Is there no way to handle this?
    I am sort of running out of time, but not able to think of any solution for this.. There must be a way to do so..
    I found the below link while surfing :
    http://www.componentworkshop.com/blog/2009/07/21/advanced-oracle-parsing-xml-fragments-in-oracle-functions-and-procedures
    I think this link has some answer to my solution in terms of joins but I managed to find no solution to it.
    <EmailAddresses>
    <EmailAddress>[email protected]</EmailAddress>
    <EmailAddress>[email protected]</EmailAddress>
    <EmailAddress>[email protected]</EmailAddress>
    </EmailAddresses>
    How do i extract the EmailAddress from the parent tag ?? while using the XPath to extract the values..??
    Please let me know.
    Thanks in advance

  • JNDI Lookup for multiple server instances with multiple cluster nodes

    Hi Experts,
    I need help with retreiving log files for multiple server instances with multiple cluster nodes. The system is Netweaver 7.01.
    There are 3 server instances all instances with 3 cluster nodes.
    There are EJB session beans deployed on them to retreive the log information for each server node.
    In the session bean there is a method:
    public List getServers() {
      List servers = new ArrayList();
      ClassLoader saveLoader = Thread.currentThread().getContextClassLoader();
      try {
       Properties prop = new Properties();
       prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
       prop.put(Context.SECURITY_AUTHENTICATION, "none");
       Thread.currentThread().setContextClassLoader((com.sap.engine.services.adminadapter.interfaces.RemoteAdminInterface.class).getClassLoader());
       InitialContext mInitialContext = new InitialContext(prop);
       RemoteAdminInterface rai = (RemoteAdminInterface) mInitialContext.lookup("adminadapter");
       ClusterAdministrator cadm = rai.getClusterAdministrator();
       ConvenienceEngineAdministrator cea = rai.getConvenienceEngineAdministrator();
       int nodeId[] = cea.getClusterNodeIds();
       int dispatcherId = 0;
       String dispatcherIP = null;
       String p4Port = null;
       for (int i = 0; i < nodeId.length; i++) {
        if (cea.getClusterNodeType(nodeId[i]) != 1)
         continue;
        Properties dispatcherProp = cadm.getNodeInfo(nodeId[i]);
        dispatcherIP = dispatcherProp.getProperty("Host", "localhost");
        p4Port = cea.getServiceProperty(nodeId[i], "p4", "port");
        String[] loc = new String[3];
        loc[0] = dispatcherIP;
        loc[1] = p4Port;
        loc[2] = null;
        servers.add(loc);
       mInitialContext.close();
      } catch (NamingException e) {
      } catch (RemoteException e) {
      } finally {
       Thread.currentThread().setContextClassLoader(saveLoader);
      return servers;
    and the retreived server information used here in another class:
    public void run() {
      ReadLogsSession readLogsSession;
      int total = servers.size();
      for (Iterator iter = servers.iterator(); iter.hasNext();) {
       if (keepAlive) {
        try {
         Thread.sleep(500);
        } catch (InterruptedException e) {
         status = status + e.getMessage();
         System.err.println("LogReader Thread Exception" + e.toString());
         e.printStackTrace();
        String[] serverLocs = (String[]) iter.next();
        searchFilter.setDetails("[" + serverLocs[1] + "]");
        Properties prop = new Properties();
        prop.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");
        prop.put(Context.PROVIDER_URL, serverLocs[0] + ":" + serverLocs[1]);
        System.err.println("LogReader run [" + serverLocs[0] + ":" + serverLocs[1] + "]");
        status = " Reading :[" + serverLocs[0] + ":" + serverLocs[1] + "] servers :[" + currentIndex + "/" + total + " ] ";
        prop.put("force_remote", "true");
        prop.put(Context.SECURITY_AUTHENTICATION, "none");
        try {
         Context ctx = new InitialContext(prop);
         Object ob = ctx.lookup("com.xom.sia.ReadLogsSession");
         ReadLogsSessionHome readLogsSessionHome = (ReadLogsSessionHome) PortableRemoteObject.narrow(ob, ReadLogsSessionHome.class);
         status = status + "Found ReadLogsSessionHome ["+readLogsSessionHome+"]";
         readLogsSession = readLogsSessionHome.create();
         if(readLogsSession!=null){
          status = status + " Created  ["+readLogsSession+"]";
          List l = readLogsSession.getAuditLogs(searchFilter);
          serverLocs[2] = String.valueOf(l.size());
          status = status + serverLocs[2];
          allRecords.addAll(l);
         }else{
          status = status + " unable to create  readLogsSession ";
         ctx.close();
        } catch (NamingException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (CreateException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (IOException e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
        } catch (Exception e) {
         status = status + e.getMessage();
         System.err.println(e.getMessage());
         e.printStackTrace();
       currentIndex++;
      jobComplete = true;
    The application is working for multiple server instances with a single cluster node but not working for multiple cusltered environment.
    Anybody knows what should be changed to handle more cluster nodes?
    Thanks,
    Gergely

    Thanks for the response.
    I was afraid that it would be something like that although
    was hoping for
    something closer to the application pools we use with IIS to
    isolate sites
    and limit the impact one badly behaving one can have on
    another.
    mmr
    "Ian Skinner" <[email protected]> wrote in message
    news:fe5u5v$pue$[email protected]..
    > Run CF with one instance. Look at your processes and see
    how much memory
    > the "JRun" process is using, multiply this by number of
    other CF
    > instances.
    >
    > You are most likely going to end up on implementing a
    "handful" of
    > instances versus "dozens" of instance on all but the
    beefiest of servers.
    >
    > This can be affected by how much memory each instance
    uses. An
    > application that puts major amounts of data into
    persistent scopes such as
    > application and|or session will have a larger foot print
    then a leaner
    > application that does not put much data into memory
    and|or leave it there
    > for a very long time.
    >
    > I know the first time we made use of CF in it's
    multi-home flavor, we went
    > a bit overboard and created way too many. After nearly
    bringing a
    > moderate server to its knees, we consolidated until we
    had three or four
    > or so IIRC. A couple dedicated to to each of our largest
    and most
    > critical applications and a couple general instances
    that ran many smaller
    > applications each.
    >
    >
    >
    >
    >

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • Selecting data from Multiple Partitions in a single select stmt.

    Hi all,
    My Database is very large & my tables are partitioned.
    My question is:
    1) If my data is spread across multiple partitions, is there any way to select data from multiple partitions in a single query?
    If we dont mention partition name also it works fine, but perofmance wise it will be very slow. (Using EXPLAIN PLAN)
    (Note:I dont want to make use of Union concept, i want to do it in a single select statement)
    For ex:
    qry1.sql:
    select empno from emp_trans partition (P012000)
    This above query(qry1.sql) will work fine.
    qry2.sql:
    select empno from emp_trans partition (P012000,P022000)
    The above query(qry2.sql) will return will return the following error:
    ORA-00933: SQL command not properly ended
    If anybody has any solution for this, pls mail me immediately.
    Thanks in advance
    bye
    null

    All my queries are dynamically generated. All my tables are also indexed partition wise based on date field. My question is, if i want to mention multiple partition names at the time of generating my query(select), then with parformance will be good. I have refered some books, inthat what they say is to use UNION concept, i dont want to use that, instead i want in a single select statement.
    Thaks for ur reply
    Bye
    null

  • How to export data with column headers in sql server 2008 with bcp command?

    Hi all,
    I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
    am trying to import data with bcp command data has been copied but column names are not came.
    I am using the below query:-
    EXEC master..xp_cmdshell
    'BCP "SELECT  * FROM   [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
    Thanks,
    SAAD.

    Hi All,
    I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
    DECLARE @BCPCMD
    nvarchar(4000)
    DECLARE @BCPCMD1
    nvarchar(4000)
    DECLARE @BCPCMD2
    nvarchar(4000)
    DECLARE @SQLEXPRESS
    varchar(50)
    DECLARE @filepath
    nvarchar(150),@SQLServer
    varchar(50)
    SET @filepath
    = N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
    as varchar(4))
    +RIGHT('00'+CAST(MONTH(GETDATE())
    as varchar(2)),2)
    +RIGHT('00'+CAST(DAY(GETDATE())
    as varchar(2)),2)+'.log" '
    Set @SQLServer
    =(SELECT
    @@SERVERNAME)
    SELECT @BCPCMD1
    = '''BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT '
    SELECT @BCPCMD2
    = '-c -t , -T -S '
    + @SQLServer + 
    SET @BCPCMD
    = @BCPCMD1+ @filepath 
    + @BCPCMD2
    Print @BCPCMD
    -- Print out below
    'BCP "SELECT 
    * FROM   [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
    EXEC
    master..xp_cmdshell
    @BCPCMD
      ''BCP' is not recognized as an internal or external command,
    operable program or batch file.
    NULL
    if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
    EXEC
    master..xp_cmdshell
    'BCP "SELECT  * FROM  
    [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
    Thanks, SAAD.

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How to select data from a table by passing document number from another tab

    How to select data from a table by passing document number from another table.
    for eg:-
    I want to display name, adres, region from ADRC table
    by using field delivery document number
    Kind Regards,
    Shanbagavalli.S

    Hi Shanbagavalli,
    There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
    **Consider that you have a Internal table having document number from other table..
    SELECT NAME ADRES REGION FROM ADRC
           INTO IT_ADRC
           FOR ALL ENTRIES IN IT_DOC
           WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
    **Consider that you have 1 document number then
    SELECT NAME ADRES REGION FROM ADRC
         INTO IT_ADRC
         WHERE DOCUMENT_NO = W_DOCUMENT_NO.
    Hope this solves your problem.
    Regards,
    Kunjal

  • How to search data from a context node.

    Hi Friends,
    Thanks for ur help for previous problem . I am facing some other problem i.e how to
    search data from a context node.
    i have a context node :-
    Car(main node) which consist of details, owners, engine and Brand  as its sub node.
    the value attibutes of difft nodes are:-
    Car-  category
    Details-  Mileage, Price, registration_no, miles_used
    owner -  name, phnno,addrs
    Brand -  main_brand, co_brand
    Engine- Bhp,Rpm
    Now i have to apply a search criteria on the basis of price, miles_used .
    pls help to implement that .
    Thanks & regards
    Pravin jha

    Hi PRAVIN,
                       What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
    Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
    Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
    I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
    Cheers!!!
    Umang

Maybe you are looking for

  • I let windows format my ipod nano?

    Today I bought a new ipod nano but the only one in store was an openbox ipod. since i am in a time crunch i decided to risk it and get the openbox ipod. i then took it home and plugged it into my pc (windows 8). a windows popup appeared that said i n

  • My computer will connect to wifi but not the Internet

    My computer will connect to wifi but not the Internet. It's not a problem with my router because I've tried other devices on the same router and they work. I have also tried my computer on other routers and there is still no Internet connection. Does

  • Question about Trend Micro renewal...

    My Trend Micro was just renewed this past weekend.  It was all confirmed, etc. through Best Buy.  When I go to my security status in Vista,  it shows Firewall is on (green),  Automatic Updating is on (green), but then is shows the Malware Protection

  • Error in bdocs

    hi experts, In transaction smw01 we are getting error message,while processing any account. But we haven't set any such message,can you leet us know,where could be the origination of such messages? Also we have checked in se91,but havent set any such

  • How to change proposed delivery data in a SO

    Hi Gems,     I am new to SD. I am creating SO with order type OR. The system is proposing Delivery date (and some other date like goods issue date, loading date etc.) as 2 days ahead of the current date.(these dates can be changed manually) U can fin