How to query from tables?

Hi!
I have two table, and I want to execute a query statement from them. How to do this?
Thanks so much!

Hi,
If you go to otn.oracle.com/products/jdev you find tutorials and Oracle By Example (OBE) instructions.
These get you started
Frank

Similar Messages

  • How to Query from table and insert into another table.

    Hi
    I am using the following query in VO and all the columns are attached to EO ( table name emp_temp)
    select a.npw_number, a.person_id,b.assignment_id,a.title,a.last_name,a.first_name,a.date_of_birth,a.sex,
    b.organization_name,b.organization_id,b.job_id,b.job_name,b.position_id,b.position_name,b.supervisor_id,
    b.supervisor_name,b.location_id,b.effective_start_date,b.effective_end_date
    from per_all_people_f a,per_assignments_v b
    where a.person_id=b.person_id
    and a.npw_number=:1
    I can query the data in screen. I need into insert the data into the emp_temp.
    I don't know how to do this . Please help me.
    Thanks
    Subra

    You can create a VO based on EO on emp_temp table.....
    And u have attached a Different VO on the page... Right...
    Now what u can do is....once u click on apply....
    u can set the each attributes of EO based VO explicitly via code, from the values of second VO.... and then commit.....
    Perhaps this might help...

  • How to query from the xml table a single, specified element.

    I'm quite new in Xml Db. Pleas, can anybody tell me how to query from the xml table below a single element (i.e. the element 'rapportoparentela = NIPOTE' related to the element 'codicefiscale = CRRVNC76R52G337R', or the element 'rapportoparentela = FIGLIO' related to the element 'codicefiscale = CRRRNT51L23G337Q')?
    - <dati xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <codiceinterno />
    <codicefiscaleassistito>CRRMNL81R31G337H</codicefiscaleassistito>
    - <famigliare>
    <codicefiscale>CRRVNC76R52G337R</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRRNT51L23G337Q</codicefiscale>
    <rapportoparentela>FIGLIO</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CBRPRN15S65E080W</codicefiscale>
    <rapportoparentela>I.S.</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRMNL81R31G337H</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>BCCCML54C50I845G</codicefiscale>
    <rapportoparentela>NUORA</rapportoparentela>
    </famigliare>
    </dati>
    Using SELECT extractValue(value(t),'/rapportoparentela') into result FROM NF_XMLT X,
    TABLE ( xmlsequence (extract(value(X),'/dati/famigliare/rapportoparentela'))) t
    I get all the elements 'rapportoparentela' and I want to get only one specified.
    Regards.
    Piero

    Piero,
    you can add the condition "CRRVNC76R52G337R" to your xpath-expression like:
    SELECT extractValue(value(t),'/rapportoparentela')
    FROM NF_XMLT x
    ,TABLE ( xmlsequence (extract(value(X),'/dati/famigliare[rapportoparentela="CRRVNC76R52G337R"]'))) tto select only those famigliare-elements that have a child-element rapportoparentela with value "CRRVNC76R52G337R".
    When you stored your XML in an XMLType column in the table, i think the following queries are better:
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE extractValue(x.your_XMLType_column,'/dati/famigliare/codicefiscale')
    = 'CRRVNC76R52G337R'or
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE existsNode(x.your_XMLType_column,'/dati/famigliare[codicefiscale="CRRVNC76R52G337R"]')
    != 0

  • How to query a table and result together with autonumber

    Hi all
    How to query a table and the result return autonumber for each row together with the table values.
    I have tried rowid but it provide me with characters.
    Tj

    What is your exact requirement?
    If you want the number of rows selected, you can use rownum.
    select rownum, a.* from <table> a;
    Cheers
    Deepak

  • How to Export from table view to Excel (not BI query)?

    There is a 'How to' document explaining how to export from an iView using a BI query:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123
    However:
    This 'How-To' document is using an example of a BEx query. I am not using a BEx query, therefore I do not have an "Info port". How can I download to Excel from a table view that is not an iView of a BI query? (It is just a internal table coming from a BAPI).

    keenneth,
    i am using the query from SQL server, i am having the same problem of not having info port. so did you find a work around for exporting to excel with filters for non sap queries ?
    any body who had come across this situation , plz guide me.
    thanks in advance
    ravi

  • How to query the table

    hi all,
    where to find the enterpraise manager url....i forgot it
    i need to know the enterprasie manager url,how to check this one from table.
    how to query this,from which table it will be fetch...
    pl share ur updates;

    gk wrote:
    hi all,
    where to find the enterpraise manager url....i forgot it
    i need to know the enterprasie manager url,how to check this one from table.
    how to query this,from which table it will be fetch...What's the db version? AFAIK there is no table in which the EM's url is kept. You can see it from the command though emctl status dbconsole .
    >
    pl share ur updates;Please write proper words in a professional forum like this one.
    Aman....

  • Ad Hoc Query from table PPDIT

    Hi,
    I'm creating an ad hoc query to retrieve data from table PPDIT by filtering the transaction key. This is to get a list of amounts posted to the technical accounts(Transaction key HRA). However, the query output and the output from table PPDIT through SE16 are different. It seems like the query only picks up transaction key HRF. Anyone with any ideas why?

    Hi,
    Than you add the additional field from extras option.
    click on extras tab.
    From there add table add field add structure.
    If you want to add a field write the name of the field and continue.
    suppose the field is matnr.
    Long text = material number
    header = material number
    and in like reference = mara-matnr.
    tablename-field name.
    let me know if this helps you.
    Regrds,
    Nikhil.

  • J2IUN Mismatch with query from table J_1IPART2

    Hi experts,
    If I run the TCODE J2IUN there is a marked difference for the RG23C register BED, AED, Cess, and HCess values that have been taken from table J_1IPART2 for the same period. What could be the cause for these differences and why did they occur or do I have to take addtional records from another table also. Well I am considering the Opening balances also.
    Please can you help me regarding this.
    Regards
    Yao Chhang

    You will have to first trace the difference. In the next step, go through J2IUN in debug mode with Abaper & check from where all the data is being picked. Next check whether all the data pick point are considered in Query.
    Regards,
    Rajesh Banka
    Reward suitable points.

  • OLAP help: How to query a table in a OLAP cube

    Hello,
    I'm completely new in OLAP (even if I participated to cube creations), and I think a know well PLSQL.
    We are on 10g v2.
    OLAP cubes have been created with dimensions and tables.
    It's possible to see and use the cubes under the AWM
    I would like to know if it's possible to access a table within a cube directly from SQLPlus?
    I thought about querying table all_objects ... but I didn't see anything good !!
    I am stuck !!
    Are the cubes saved in the same DB as the relational standard objects ?
    I hope that you can give me some help... or provide me with good URLs ...
    Thanks in advance,
    Olivier

    Hello Maxim,
    Thanks for your reply..
    I looked at the doc you gave, and also I am now able to get the names of cubes and dimensions :
    The cubesselect aw_owner||'.'||aw_name||'!'||aw_logical_name cube
    from olapsys.ALL$OLAP2_AW_CUBES
    order by cube;
    The dimensionsselect aw_owner||'.'||aw_name||'!'||aw_logical_name dimension
    from olapsys.ALL$OLAP2_AW_DIMENSIONS order by dimension;
    So, I start to figure out where I would like to go ...
    But, in the doc, there is a lot of CREATE commands ....
    I'm puzzled !! ... Do I have to create objects in sqlplus (views or something else) prior to query a table ?
    Also, when I see the dimensions in table olapsys.ALL$OLAP2_AW_DIMENSIONS ...
    Is it possible to DESC these "tables" or make a SELECT ?
    Thanks,
    Olivier

  • How can query the table MARD using the parameters

    Hi,
    I have inputs as material number , sales organization , distribution chanel and plant , using this i have query the table MARD . in MARD table material number and plant is available , how can i relate sales organization and distribution chanel to query the table, please help.
    Regards,
    Ratheesh

    Hi,
    MVKE table contains the relationship between material, sales org. and distribution channel.
    You can hence create a join between MARD and MVKE tables and create a query.
    Regards,
    Aditya

  • Help in query from table

    Hi,
    I am having a strange issue,
    i have a table containing the following amgst others
    rec_time sys_date
    7:00 04/08/2010
    8:00 04/08/2010
    9:00 05/08/2010
    I need to query this table and return the max(rec_time) for all sys_date = sysdate
    its not working if i do the following
    select max(rec_time) from table
    where sys_date = sysdate;

    hello,
    this is my table structure for hourly_sales
      ID                 NUMBER,
      PRODUCT            VARCHAR2(25 BYTE)          NOT NULL,
      GAME_ID            NUMBER                     NOT NULL,
      SYS_DATE           DATE                       NOT NULL,
      CONFIRMED          CHAR(1 BYTE)               DEFAULT 'N',
      ACT_AMT            NUMBER                     NOT NULL,
      CUMM_AMT           NUMBER                     NOT NULL,
      COUNT_SALES        NUMBER                     NOT NULL,
      CREATED_BY         VARCHAR2(25 BYTE),
      CREATION_DATE      DATE,
      LAST_UPDATED_BY    VARCHAR2(25 BYTE),
      LAST_UPDATED_DATE  DATE,
      REC_TIME           VARCHAR2(25 BYTE)          NOT NULL,
      ORDER_ID           NUMBERI have created a small application in APEX that has an LOV for rec_time from 7.00 to 22.00. this is just an indication to the times that values are being entered.
    Now those geezers were making mistakes and the reason why i wanted my query was to enable them to roll-back on a button click
    delete from hourly_sales
    where rec_time = max(rec_time)
    and trunc(sys_date) = trunc(sysdate);but when i was querying it was not returning any values.

  • How to query from view with parameter, only  when the JSP-page loading

    I use JSF/ADF BC, create two viewes:view1 and view2, in the JSP page the user press a button to query from the view1, but I hope the view2 can be queried only when the page loading, it have no relation with user-operator, and pass the column value of view2 into some variables, the view2 return one record.

    Hi -
    You may want to have a look at this other thread:
    Re: Execute ViewObject with Parameters at JSF Page Load?  JSF/ADF/BC 10.1.3
    John

  • Nested Repeat Region (How to convert from table to list)

    Sorry, i am really no PHP hero :-(
    i created a menu with the "nested repeat region" wizzard. Now i want to change the HTML from TABLE to LIST.
    I thought i just need to delete <table>- and <td>-tags, replace <tr> with <ul> and that's it. (But ist's NOT!)
    This is my code:
    ------- START ----------------
    <ul id="nav">
          <?php do { ?>      
              <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
            <?php
      if ($totalRows_master1waa_page_top>0) {
        $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
        mysql_select_db($database_WAA);
        $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
        $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
        $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
        $nested_sw = false;
        if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) {
          do { //Nested repeat
    ?>
              <ul>
                <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
              </ul>
              <?php
          } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next
    ?>
            <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
    </ul>  
    ------- END -----
    The problem is located in line 3. the result is a list like this:
    <ul id="nav">
         <li>xxx</li>
         <li>xxx</li>
              <ul>
                    <li>xxx</li>
                    <li>xxx</li>
              </ul>
         <li>xxx</li>
    </ul>
    Of course it will not work. I need the nested list inserted like this:
    <ul id="nav">
         <li>xxx</li>
         <li>xxx
              <ul>
                    <li>xxx</li>
                    <li>xxx</li>
              </ul>
          </li>
         <li>xxx</li>
    </ul>
    Can someone please help me changing my code to get this result?

    Hi,
    I had trouble replying. I may be of some assistance until one of the Guru's get on.
    The whole thing works on loops based inside do and while
    EX.
    <?php
              do{    //end php, use html
    ?>
    I can repeat anthing here in HTML!
    <?php } while ( /* some critera exist ex: i<5 */      ); ?>
    so, your 'options' tag or LI' tags should only exist inside the first loop, check your { }
    The entire LIST  would repeat if you add the UL tags inside the nested loop area
    You may find it easier to reaplace the table with div tags and then indent the sub or nested loop with a class
    I don't have time to test this but try this:
    <ul id="nav">
    <ul>
    <?php do { ?>      
      <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
    <?php
      if ($totalRows_master1waa_page_top>0) {
        $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
        mysql_select_db($database_WAA);
        $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
        $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
        $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
        $nested_sw = false;
        if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) { ?>
       <ul>
      <?php  do { //Nested repeat ?>   
                   <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
            <?php } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next ?>
        </ul>
    <?php 
    ?>
            <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
    </ul>
    Hit me back if its close but wonky..
    J

  • Help on how to query 11g table with XMLType column

    To all,
    We have this table:
    DESC MESSAGE
    Name Null Type
    MESSAGE_ID NOT NULL NUMBER(38)
    REQUEST_UU_ID NOT NULL VARCHAR2(50)
    MESSAGE_TYPE_CD NOT NULL CHAR(3 CHAR)
    EMPLOYEE_NUM NOT NULL VARCHAR2(8)
    SEQUENCE_NUM VARCHAR2(20)
    REVERSAL_SEQUENCE_NUM VARCHAR2(20)
    TRANSACTION_TS TIMESTAMP(6)
    MESSAGE_CONTENT_TXT NOT NULL XMLTYPE()
    CREATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    CREATE_BY_TS NOT NULL TIMESTAMP(6)
    LAST_UPDATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    LAST_UPDATE_BY_TS NOT NULL TIMESTAMP(6)
    Given we have multiple columns and one is XMLType how do I query to find rows in the db that match this XPath
    Here is a fragment of XML that is held in MESSAGE_CONTENT_TXT XMLType column:
    <?xml version="1.0" encoding="UTF-8"?>
    <cfg-env:Envelope xmlns="http://www.co.com/schemas/CFX/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.co.com/schemas/cfg-env/" >
         <cfg-env:Header>
              <cfg-hdr:MessageHeader xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns="http://www.co.com/schemas/CFX/">
                   <cfg-hdr:Service>
                        <cfg-hdr:ServiceName>process</cfg-hdr:ServiceName>
                        <cfg-hdr:MessageType>Request</cfg-hdr:MessageType>
                        <cfg-hdr:ServiceVersion>1</cfg-hdr:ServiceVersion>
                   </cfg-hdr:Service>
                   <cfg-hdr:From>
                        <cfg-hdr:PartyId>13-175-8724</cfg-hdr:PartyId>
                        <cfg-hdr:CostCenter>2009065</cfg-hdr:CostCenter>
                        <cfg-hdr:System>
                             <cfg-hdr:Application>[email protected]</cfg-hdr:Application>
                             <cfg-hdr:Version>1.0</cfg-hdr:Version>
                             <cfg-hdr:Channel>TLR</cfg-hdr:Channel>
                        </cfg-hdr:System>
                        <cfg-hdr:OrigReplyToQMgr>QMBKRD01</cfg-hdr:OrigReplyToQMgr>
                        <cfg-hdr:OrigReplyToQ>Q1</cfg-hdr:OrigReplyToQ>
                   </cfg-hdr:From>
                   <cfg-hdr:UserSession>
                        <cfg-hdr:SignonRole>User</cfg-hdr:SignonRole>
                        <cfg-hdr:LogonId>R099999</cfg-hdr:LogonId>
    I'm trying to find rows in the database that are /Envelope/Header/MessageHeader/UserSession/LogonId/R099999.
    Thanks for the assistance. I'm new to XML DB. I appreciate the help.
    Eric

    Hi Eric,
    You can use XMLExists, like this :
    select *
    from message t
    where xmlexists(
          'declare namespace env = "http://www.co.com/schemas/cfg-env/"; (: :)
           declare namespace hdr = "http://www.co.com/schemas/cfg-hdr/"; (: :)
           /env:Envelope/env:Header/hdr:MessageHeader/hdr:UserSession[hdr:LogonId=$id]'
           passing t.message_content_txt
                 , 'R099999' as "id"
    );

  • How to query a table join in SAP?

    Hi,
    We are rolling out SAP and our abapers are wondering how to debug production problems.  From our experience with PeopleSoft, there is often a need to query tables directly in production.  These queries are often joins.  SAP provides SE16 to query a single table, but how to SDN'ers query a join in PROD?
    For a basic example, how would you join a sales item and sales header?  We are thinking of using Oracle OpenSQL to have direct table access.  Solutions that somehow use SAP security for developers to access production are good!
    Any suggestions are welcome and points will be rewarded!!
    Peter

    Peter,
    Be careful if your company is large enough to have been impacted by Sarbanes-Oxley 404.  Your external auditing firm should be engaged in whatever approach you take.
    This type of information/querying is now much more monitored/controlled for SOX 404-impacted organizations.
    Example - SQVI has been removed from all PRD instances in our company b/c of SOX 404.

Maybe you are looking for

  • Purchase LR 4.0 for Trial of LR 4.1

    I am using the trial version of Lightroom 4.1. I will soon be purchasing the full version 4.0 from Amazon, as it is cheaper than Adobe. I will get a box from Amazon that I assume will contain LR 4.0. Will I be able to just enter that 4.0 license key

  • Import From Excel to Address Book?

    I have several large lists in an Excel file that I would like to import into address book easily. Can this be done? If so, please provide some direction.

  • Cfmail cf10 - "from" and "Username" must be the same?

    Hi, i am want to send from [email protected] to the debugging team [email protected] using this simple code <cfmail to="[email protected]" from="[email protected]" subject="sending error message plz respond!" username="[email protected]" password="pa

  • These forums do not work in IE11

    When I try and reply to a post here I just get a blank edit window that shows nothing other than gray.  This is in IE11 on Windows 8.1. IE11 is hardly a new web browser...  please fix. Please note that I use the "Tracking Protection" feature in IE11

  • Poor playback of AfterEffects comp in PP5.5

    I'm throwing this out to the post Yoda's to give me a better workflow or tell me what I'm doing wrong. I'm colour grading a few personal projects using Colorista2 but that plugin only works properly in After Effects.  My workflow has been: Edit in PP