Exists row in join query

In a query as the following
SELECT DISTINCT A.*,D.*,
      AN1.*,  AN2.*,  AN3.*,  AN4.*,  AN5.*, AN6.*, AN7.*
FROM T1 A, T2 D,
       T3 AN1, T4 AN2, T5 AN3,
       T6  AN4,  T7 AN5 , T8 AN6 ,
       T9 AN7
WHERE (D.C1(+) = A.CX )
AND  (AN1.C2(+) = A.CX)
AND  (AN2.C2(+) = A.CX)
AND  (AN3.C2(+) = A.CX)
AND  (AN4.C2(+) = A.CX) 
AND  (AN5.C2(+) = A.CX)
AND  (AN6.C2(+) = A.CX) 
AND  (AN7.C2(+) = A.CX)is possible know if the join table: D, AN1, AN2, AN3, AN4, AN5, AN6,AN7
return back a row(that is, if they have rows chained to A's table), in single query(same query)?
Thanks

You could check if its primary key columns are empty, if that is what you mean.
With an expression like this:
case when d.c1 is null then 'no corresponding d-record found' else 'corresponding d-record found' endyou can see it in your select list.
If this is not what you mean, please clarify some more.
Regards,
Rob.

Similar Messages

  • How to get Hierarchical XML File from a Database Join Query !

    Hi,
    How can i get a Hierarchical XML File from a Database Join Query ?
    Any join query returns repeated values as below:
    BD17:SQL>select d.dname, e.ename, e.sal
    2 from dept d
    3 natural join
    4 emp e
    5 /
    DNAME ENAME SAL
    ACCOUNTING CLARK 2450
    ACCOUNTING KING 5000
    ACCOUNTING MILLER 1300
    RESEARCH SMITH 800
    RESEARCH ADAMS 1100
    RESEARCH FORD 3000
    RESEARCH SCOTT 3000
    RESEARCH JONES 2975
    SALES ALLEN 1600
    SALES BLAKE 2850
    SALES MARTIN 1250
    SALES JAMES 950
    SALES TURNER 1500
    SALES WARD 1250
    14 rows selected.
    We tried use DBMS_XMLQUERY to generate a xml file, but it was unable to get xml in Hierarchical format.
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <ROWSET>
    - <ROW num="1">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>CLARK</ENAME>
    <SAL>2450</SAL>
    </ROW>
    - <ROW num="2">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>KING</ENAME>
    <SAL>5000</SAL>
    </ROW>
    - <ROW num="3">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>MILLER</ENAME>
    <SAL>1300</SAL>
    </ROW>
    - <ROW num="4">
    <DNAME>RESEARCH</DNAME>
    <ENAME>SMITH</ENAME>
    <SAL>800</SAL>
    </ROW>
    - <ROW num="5">
    <DNAME>RESEARCH</DNAME>
    <ENAME>ADAMS</ENAME>
    <SAL>1100</SAL>
    </ROW>
    - <ROW num="6">
    <DNAME>RESEARCH</DNAME>
    <ENAME>FORD</ENAME>
    <SAL>3000</SAL>
    </ROW>
    - <ROW num="7">
    <DNAME>RESEARCH</DNAME>
    <ENAME>SCOTT</ENAME>
    <SAL>3000</SAL>
    </ROW>
    - <ROW num="8">
    <DNAME>RESEARCH</DNAME>
    <ENAME>JONES</ENAME>
    <SAL>2975</SAL>
    </ROW>
    - <ROW num="9">
    <DNAME>SALES</DNAME>
    <ENAME>ALLEN</ENAME>
    <SAL>1600</SAL>
    </ROW>
    - <ROW num="10">
    <DNAME>SALES</DNAME>
    <ENAME>BLAKE</ENAME>
    <SAL>2850</SAL>
    </ROW>
    - <ROW num="11">
    <DNAME>SALES</DNAME>
    <ENAME>MARTIN</ENAME>
    <SAL>1250</SAL>
    </ROW>
    - <ROW num="12">
    <DNAME>SALES</DNAME>
    <ENAME>JAMES</ENAME>
    <SAL>950</SAL>
    </ROW>
    - <ROW num="13">
    <DNAME>SALES</DNAME>
    <ENAME>TURNER</ENAME>
    <SAL>1500</SAL>
    </ROW>
    - <ROW num="14">
    <DNAME>SALES</DNAME>
    <ENAME>WARD</ENAME>
    <SAL>1250</SAL>
    </ROW>
    </ROWSET>
    Thank you for some help.
    Nelson Alberti

    Hi,
    I wrote a general ABAP program which can be configured to grab contrent from an URL and post that content as a new PI message into the integration adapter .... from that point on normal PI configuration can be used to route it to anywhere ...
    It can be easily scheduled as a background job to grab content on a daily basis etc ...
    Regards,
    Steven

  • Deciphering column names in a join query using jdbc

    hi all....
    I am making a database adapter for a generic report generater. This adapter would be forming queries involing various tables. There are two ways of doing it . I fire an sql on parent table to get the keys and then go to child table for each one of them or i form a join query to get desired result.
    i want to go with the later approach where my query would be forming a join. The problem comes when table involved in this join has columns with the same name. for eg if a column "NOTE" is there in table A as well as table B on which i have a join. Resultset returns me with two "NOTE" columns and i cannot recognize which one belongs to which table.
    all API calls including getString("Note") seems to be referring to the first occurence of "Note" column.
    Also getTableName() and getSchemaName() APIs on resultsetMetadata doesnt return in anything in case of joins.
    Any pointers would be most appreciated.
    cheers
    vivek

    thanks for suggesting this solution ... though i had thought of the same onece .... unfortunately i cannot implement something like this coz out of the result set i have to instantiate an object hierarchy depending on the schema ....
    this also puts me in a doubt whether i can use join in my case.
    for eg ... .
    lets say we have a customer talbe and and address table which has one to many relationship .... one contact can have multiple addresses.
    Assuming a contanct "Joe Bloggs" having 3 addresses ...a query like following
    select contact.firstname contactfirstname , address.streetname addressstreetname from contact , address where contact.contactid = address.contactid
    this would return me 3 rows and i can also recognize various columns with their aliases ..
    but i would lose an important fact that i have to create one java object for contact class and 3 instances for addresses which i have to return finally.
    this means that i would like to return an object hierarchy with one contact object and 3 address object underneath it linked with contactid.
    Any other suggestions after reading the complete requirement are most welcome ...sorry for not puting the entire thing at first.
    i guess the only soln left is to visit contact and address table separately. :(

  • Exists clause in plsql query

    HI I see that by the use of exists clause while joining
    1) oralce provides a better execution plan ... and 2) it eliminates duplicates automatically
    but my question is how to access the columns of the inner tables in the select clause ?
    EG:
    select a.sno, b.course_name
    from a,b
    where a.cid=b.cid
    ----------------------in the below query How do i access b.course_name in the select clause? similarly even if it contains more tables nested, i should be able to access the column of the inner tables from the select clause . How to do this . hope i am clear
    select a.sno from a where exists ( select 1 from b where b.cid=a.cid)

    You cannot access columns from tables in an EXISTS (or NOT EXISTS) clause outside of that clause. You can only select data from tables (and other objects) that you are actually selecting from.
    Justin

  • Cartesian Join query optimization

    Hello Experts!
    I have a question about cartesian join query which might look a bit weird.
    Assume the SQL query like that:
    SELECT DISTINCT A.NAME
    FROM A, B, C;
    Here we have cartesian join for 3 tables A, B and C.
    It looks to me, in order to get the result for such a particular SQL tables/sets B and C need to be accessed only to ensure they return at least 1 row (otherwise result set is empty), query table A, but there is no actual need to join the data.
    If you run such a query Oracle is doing full table scans and actually joins the data.
    Yes, DBMS is doing exactly what you are asking for, but I wonder if there is any way (SQL hint or db parameter or anything else) to enforce more optimal access path here?
    Obvious solution to remove B and C tables from the SELECT statement is not acceptable. :-)
    Thank you!

    Your statement in the other thread indicates you don't understand how the BI prompts actually work because you say you want it to do something that doesn't make sense for it to do.
    Of course Product and Account levels will be constrained to the interval you specified. It wouldn't make sense for them not to be. Because that would mean returning data for based on product and account levels that has a different open data range than what you specified.
    All UI prompt dialogs I have seen use AND relationships between the parameters. If there are three parameters (A, B, C) then the ultimate relationship is 'A AND B AND C'; not 'A OR (B AND C)', 'A AND (B OR C)', 'A OR (B OR C).
    Unless the tool allows you to select OR relationships you need to use a separate dialog box (parameter dialog) for each condition set.:-)
    I understand how BI prompts work and basically agree on your comment, but there are two problems here:
    1. I need to convince the customer his original requirements are not valid. Customer want it to work different way and there are some reasons why.
    2. There are pretty large dimensions and fact tables used here, so when I choose filter criteria for the Product (which is small table) to populate/recalculate prompt values, large SR dimension and fact tables are joined too, and if there are Account dimension filters added, huge Account dimension will be added as well. This looks to be a bit sub-optimal for just populating the Product prompt values.
    Of course, technically this is solvable, but requires to put some extra effort and does not solve the 1st issue.
    That other link doesn't explain the sample code you posted in this thread. Post the actual query that is being generated and the query that you want to actually use.This is what is generated:
    >
    select distinct T311691.X_CUST_SUBTYPE as c1
    from
    WC_LOV_SR_AREA_H T311695,
    WC_LOV_PROD_H T311687,
    WC_LOV_CUST_TYPE_H T311691,
    W_SRVREQ_D T302384 /* Dim_W_SRVREQ_D */
    where ( T311687.LEV1 = 'Product X' and T311691.X_CUST_TYPE = 'Business' and T302384.OPEN_DT between TO_DATE('2012-03-01 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') and TO_DATE('2012-03-31 00:00:00' , 'YYYY-MM-DD HH24:MI:SS') )
    order by c1
    >
    This is what is actually needed to query this data:
    >
    select distinct T311691.X_CUST_SUBTYPE as c1
    from
    WC_LOV_CUST_TYPE_H T311691
    where ( T311691.X_CUST_TYPE = 'Business' )
    order by c1

  • Changing the Existing Row's Data

    Objective :
    Change the data in a Existing row of a table
    Problem.
    I am unable to change an existing row's data
    I think it is in inactivate state
    please provide me a solution for my query
    thanks
    prasad

    hi,
    you can change from se11
    firstle check is the table in display or change mode. if in display goto change mode
    after you display the values check the check box by the side of the row you want to change and press change(f6) you can change values except the primary key values
    or if you have TMG you can do the same from sm30
    you can write a cusrtom program and change the values using modify statement
    if you want to change the primary key values you must delete rhe row and enter new row thats only way
    reward if helpful
    prasanth

  • SQL - Retriving Last 6 rows from Join of 2 Tables

    Hi All
    I want to retrive the last 6 rows from a query which has join of 2 tables
    Thanks in adv.
    Junu

    Hi,
    Check this.
    SELECT e.empno, e.deptno, e.sal,e.rn
    FROM (
         SELECT ROWNUM rn, a.empno, b. deptno, a.sal,
              ( SELECT COUNT(1) FROM scott.emp c, scott.dept d
                        WHERE c.deptno = d.deptno ) max_rn
    FROM scott.emp a, scott.dept b
              WHERE a.deptno = b.deptno
         ) e
    WHERE rn BETWEEN max_rn -6 AND max_rn     
    ORDER BY rn     
    Regards
    K.Rajkumar

  • How to refresh an existing row of a JTable

    Hi all,
    I have to refresh the data of an existing row of a JTable after some time in thread. The code snippet is
    DefaultTableModel model=new DefaultTableModel(data,columnNames);
    table = new JTable(model)
                   public boolean isCellEditable(int row, int col)
                   return false;
    Now I also add rows to this table within the run() of the thread as
    model.addRow(new Object []{sub1,sub6,sub12,sub3,sub18});
    My problem is that I want to refresh the data of this added row within the thread.
    Any help is highly appreciable. Thanks in advance.
    Regards,
    Har Krishan

    Hmmm. His qhestion does not seem to be with how to change the value of a field, but how to get the table to recognize the change. I thought such things were automatic. The model fires a value changed event and the JTable picks up the event and refreshes. I'm not sure why your table is not refreshing under these circumstances. Perhaps a more complete code snippet. Please use the open and close code tags to format your code if you include it.

  • How can I do for a row of a query be data provider for a variable?

    Hi friends, I have a problem !
    How can I do for a row of a query be data provider for a variable?
    I need that a value of variable be stored when the user select a row in a query. At the BPS we can do this configuring the variable selector in WIB, and in a WAB how I can do this ?
    Best regards,
    Gustavo Liberado

    In this case when I press the key to call other forms I need to wait for the response in the secondary form and then process the result.That is exactly what a "modal JDialog" (or JOptionPane) are used for.
    Try it. Create a short demo program. All you need is a JFrame with a single button to show the modal dialog. All you modal dialog needs is a single button to close the dialog. After you show the modal dialog add a System.out.println(...) statement in your code and you will see that it is not executed until the dialog is closed.
    Then once you understand the basics you add the code to your real program.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How to add new row and update existing rows at a time form the upload file

    hi
    How to add new row and update existing rows at a time form the upload file
    example:ztable(existing table)
    bcent                      smh            nsmh         valid date
    0001112465      7.4                       26.06.2007
    0001112466      7.5                       26.06.2007
    000111801                      7.6                       26.06.2007
    1982                      7.8                       26.06.2007
    Flat file structure
    bcent                       nsmh         valid date
    0001112465     7.8     26.06.2007  ( update into above table in nsmh)
    0001112466     7.9     26.06.2007  ( update into above table in nsmh) 
    000111801                     7.6      26.06.2007 ( update into above table in nsmh
    1985                      11              26.06.2007   new row it should insert in table
    thanks,
    Sivagopal R

    Hi,
    First upload the file into an internal table. If you are using a file that is on application server. Use open dataset and close dataset.
    Then :
    Loop at it.
    *insert or modify as per your requirement.
    Endloop.
    Regards,
    Srilatha.

  • How can I perform this kind of range join query using DPL?

    How can I perform this kind of range join query using DPL?
    SELECT * from t where 1<=t.a<=2 and 3<=t.b<=5
    In this pdf : http://www.oracle.com/technology/products/berkeley-db/pdf/performing%20queries%20in%20oracle%20berkeley%20db%20java%20edition.pdf,
    It shows how to perform "Two equality-conditions query on a single primary database" just like SELECT * FROM tab WHERE col1 = A AND col2 = B using entity join class, but it does not give a solution about the range join query.

    I'm sorry, I think I've misled you. I suggested that you perform two queries and then take the intersection of the results. You could do this, but the solution to your query is much simpler. I'll correct my previous message.
    Your query is very simple to implement. You should perform the first part of query to get a cursor on the index for 'a' for the "1<=t.a<=2" part. Then simply iterate over that cursor, and process the entities where the "3<=t.b<=5" expression is true. You don't need a second index (on 'b') or another cursor.
    This is called "filtering" because you're iterating through entities that you obtain from one index, and selecting some entities for processing and discarding others. The white paper you mentioned has an example of filtering in combination with the use of an index.
    An alternative is to reverse the procedure above: use the index for 'b' to get a cursor for the "3<=t.b<=5" part of the query, then iterate and filter the results based on the "1<=t.a<=2" expression.
    If you're concerned about efficiency, you can choose the index (i.e., choose which of these two alternatives to implement) based on which part of the query you believe will return the smallest number of results. The less entities read, the faster the query.
    Contrary to what I said earlier, taking the intersection of two queries that are ANDed doesn't make sense -- filtering is the better solution. However, taking the union of two queries does make sense, when the queries are ORed. Sorry for the confusion.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help with Inner Join query in SQL

    Hope someone can help with this, as this is quite an involved project for me, and I'm just about there with it.
    My table structure is :
    table_packages
    packageID
    package
    packageDetails
    etc
    table_destinations
    destinationID
    destination
    destinationDetails
    etc
    table_packagedestinations
    packageID
    destinationID
    ..so nothing that complicated.
    So the idea is that I can have a package details page which shows the details of the package, along any destinations linked to that package via the packagedestinations table.
    So this is the last part really - to get the page to display the destinations, but I'm missing something along the way....
    This is the PHP from the header, including my INNER JOIN query....
    PHP Code:
    <?php
    $ParampackageID_WADApackages = "-1";
    if (isset($_GET['packageID'])) {
      $ParampackageID_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
    $ParamSessionpackageID_WADApackages = "-1";
    if (isset($_SESSION['WADA_Insert_packages'])) {
      $ParamSessionpackageID_WADApackages = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_packages'] : addslashes($_SESSION['WADA_Insert_packages']);
    $ParampackageID2_WADApackages = "-1";
    if (isset($_GET['packageID'])) {
      $ParampackageID2_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
    mysql_select_db($database_connPackages, $connPackages);
    $query_WADApackages = sprintf("SELECT packageID, package, costperpax, duration, baselocation, category, dateadded, agerange, hotel, educational_tours, field_trips, corporate_outings, plant_visits, budget_package, rollingtours, teambuilding, description, offer FROM packages WHERE packageID = %s OR ( -1= %s AND packageID= %s)", GetSQLValueString($ParampackageID_WADApackages, "int"),GetSQLValueString($ParampackageID2_WADApackages, "int"),GetSQLValueString($ParamSessionpackageID_WADApackages, "int"));
    $WADApackages = mysql_query($query_WADApackages, $connPackages) or die(mysql_error());
    $row_WADApackages = mysql_fetch_assoc($WADApackages);
    $totalRows_WADApackages = mysql_num_rows($WADApackages);
    $colname_educationalDestinations = "1";
    if (isset($_GET['PackageID'])) {
      $colname_educationalDestinations = (get_magic_quotes_gpc()) ? packageID : addslashes(packageID);
    mysql_select_db($database_connPackages, $connPackages);
    $query_educationalDestinations = sprintf("SELECT * FROM destinations INNER JOIN (packages INNER JOIN packagedestinations ON packages.packageID = packagedestinations.packageID) ON destinations.destinationID = packagedestinations.destinationID WHERE packages.packageID = %s ORDER BY destination ASC", GetSQLValueString($colname_educationalDestinations, "int"));
    $educationalDestinations = mysql_query($query_educationalDestinations, $connPackages) or die(mysql_error());
    $row_educationalDestinations = mysql_fetch_assoc($educationalDestinations);
    $totalRows_educationalDestinations = mysql_num_rows($educationalDestinations);
    ?>
    And where I'm trying to display the destinations themselves, I have : 
    <table>
            <tr>
                     <td>Destinations :</td>
                </tr>
               <?php do { ?>
            <tr>
                 <td><?php echo $row_educationalDestinations['destination']; ?></td>
            </tr>
            <?php } while ($row_educationalDestinations = mysql_fetch_assoc($educationalDestinations)); ?>
    </table>
    If anyone could have a quick look and help me out that would be much appreciated - not sure if its my SQL at the top, or the PHP in the page, but either way it would be good to get it working. 
    Thanks.

    First off, you need to get the database tables so that there is a relationship between them.
    In fact, if there is a one to one relationship, then it may be better to store all of your information in one table such as
    table_packages
    packageID
    package
    packageDetails
    destination
    destinationDetails
    etc
    If there is a one to many relationship, then the following would be true
    packages
    packageID
    package
    packageDetails
    etc
    destinations
    destinationID
    packageID
    destination
    destinationDetails
    etc
    The above assumes that there are many destinations to one package with the relationship coloured orange.
    Once you have the above correct you can apply your query as follows
    SELECT *
    FROM packages
    INNER JOIN destinations
    ON packages.packageID = destinations.packageID
    WHERE packages.packageID = %s
    ORDER BY destination ASC
    The above query will show all packages with relevant destinations

  • How to edit the properties for existing variables in BEX query, so that I can get multiple input selections

    Dear fellow developers,
    I'm trying to edit an existing variable using BEX query, so that it can allow multiple input selections.
    As you can see in the screenshot attached, the option is selectable during creation.
    However, during editing of an existing field, this field (Details -> Basic Settings -> Variable Represents) is not selectable.
    Does anyone knows why, and how to remedy this?

    Yes you can do it at the table level.
    Go to SE11 enter table name as RSZGLOBV.
    Enter the technical name of variable in VNAM field..You need to change the value in VPARSEL column.
    Please make sure to get the where used list of this variable so that you can know the impact,if something goes wrong.
    Also change it in DEV and then transport across the landscape.
    PS:Same thing has been described in this blog as well
    Changing BI variable parameters
    Regards,
    AL
    Message was edited by: Anshu Lilhori

  • How to create new or delete the existing row in the grid....

    hi my friends...
    i am developing report using Reuse_alv_grid_display...
    my requirement is... At runtime
              1.  i may create new row on the grid (empty row inwhich  i may enter the data).
              2.  i may delete a existing row in the grid
              3.  i may edit the existing data...
    then i have to trace the modification in the grid in one internal table...
    how can i get into this.....
    note:
    i have some idea to edit the existing record in the grid and trace those modification,
    but i don't know abt how to create new or delete the existing row....
    can you give me some idea...

    Hi deva,
    write a class which implemets these methods
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    To handle the toolbar on alv
         handle_toolbar
           FOR EVENT toolbar OF cl_gui_alv_grid
              IMPORTING e_object e_interactive,
    To handle the buttons on the alv grid
         handle_user_command
           FOR EVENT user_command OF cl_gui_alv_grid
           IMPORTING e_ucomm.
    endclass.
    Now Implement these methods.
    CLASS lcl_event_receiver IMPLEMENTATION.
    To handle the toolbar on alv
      METHOD handle_toolbar.
       DATA ls_toolbar  TYPE stb_button.
        CLEAR gs_toolbar.
        MOVE 3 TO gs_toolbar-butn_type.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_INSERT_ROW' gs_toolbar-icon.
        MOVE text-010 TO gs_toolbar-function.
        MOVE text-012 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_DELETE_ROW' gs_toolbar-icon.
        MOVE text-011 TO gs_toolbar-function.
        MOVE text-013 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
       METHOD handle_user_command.
    In this form, check the function code(e_ucomm has the function code), based on that do the required action.
    as i said yesterday(i.e for appending a row, deleting a row, modifying a row)
        PERFORM user_command USING e_ucomm.
      ENDMETHOD
    endclass.
    Before calling the alv method, create a object of this class.
    DATA :
          gref_event_receiver  TYPE REF TO lcl_event_receiver,
          gv_tables_alv          TYPE REF TO cl_gui_alv_grid.
          CREATE OBJECT gref_event_receiver.
          SET HANDLER   gref_event_receiver->handle_user_command
                        FOR gv_tables_alv.
          SET HANDLER   gref_event_receiver->handle_toolbar
                        FOR gv_tables_alv.
    check this program for event handling, it is the similar way
    demo_abap_objects_events
    Hope u understood this.
    Regards,
    Prasant
    reward if helpful

  • Problem getting results with no unique key in a joined query

    I created a descriptor to do a joined query, which generated a query in log as:
    Select t0.empID,t1.empID, t1.phone from Emp t0, Phone t1
    where t0.empId=t1.empId and t0.empId=1001
    When I run it, I got the result as:
    1001,1001,9999999
    1001,1001,9999999
    The correct result should be (I copy and paste the query from log into SQL-Plus):
    1001,1001,9999999
    1001,1001,1234455
    I suspect this is caused by Toplink caching objects by primary key. I wonder if anybody has a solution for this.
    My descriptor is created using WorkBench. Emp is the primary table, Phone as additional table linked by foreignKey empId.
    The join is implemented by modifying the descriptor as the following:
    ExpressionBuilder builder = new ExpressionBuilder();
    descriptor.getQueryManage()
    .setMultipleTableJoinExpression(
    builder.getField("EMP.EMPID").equal(
    builder.getField("EMP.EMPID")));
    descriptor.disableCacheHits();
    I'd really appreciate your help.

    I am implementing a people search function. The batch reading is quite expensive if toplink does a read query for every person. A customized query requires only one database access, the other way may requires hundreds.
    I don't want to use the cache either in this case because the database is also accessed by legacy system which cann't notify toplink any updates.
    I opened a TAR on this and the solution I got is to use ReportQuery rathen than ReadAllQuery. The only problem here is that now I have to map the query result to my class manually.

Maybe you are looking for

  • Monitors Incompatibility List

    Somebody plz tell me if there is a list of incompatible monitors with the mac mini. I am going to buy a mac mini and simply wish to know if the monitor Samsung Syncmaster 773s will be compatible with it. Has anybody had any problems with this particu

  • Query taking long to execute

    Hello One of my report taking long to execute. i have range base partition on table and indexes by month. following are the details SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 7 13:41:04 2011 Copyright (c) 1982, 2010, Oracle.  All rights reser

  • Portal Logon page customization for EP 7.0 EHP1 (EP 7.01)

    Hi All, We are working on SAP NW 7.0 EHP1 version. In this i have to change the Logon page which has the Self registration link. I have to change the URL when clicked on this Self registration link. I have gone through lot of help links in SDN howeve

  • Adobe form for WD4 ABAP .

    Hi ,     I want to create a table in web dynpro ABAP where user will enter data and submit the adobe form the user can also increase the rows of the table , please provide me some code or help link. Thanks & Regards Gaurav Jain

  • Premier Pro Freezes on "New" Machine

    I have purchased a 27inch mid 2011 iMac. It has a 2.7GHz Core i5, with 12GB of RAM. The graphics card is a Radeon HD 6770M with 512MG dedicated GDDR5 memory I took the machine (used but reloaded to "new" condition on Monday 21/01/13) and loaded only