Multiple conditions in Query doesn't work

Hi all,
I've made a query pointing on a Multiprovider wich 's made of two main dimension ( multiple infoproviders ) :
contract and pricing and on the other hand  Sales and Revenues.
In my Query, one condition's concerned by a contract & pricing key figures ( Number of pricing condition > 0 ), and another one is about a Minimum Turnover Sales & Revenues key Figures restriction( by a prompt ).
This doesn't match, Some rows are missing, and while a condition is active , the other one can't be..
If any one meet this kind of problem before ?
Thanks and sorry for my bad english..

Hi,
I already try to create another key figure wich made like this :
Number of condition * Turnover
and made a condition on this result.
But the main problem is  if the contract doesn't have Turnover, it will not shown the rows with condition ..( the condition is on the single value 'number of document ) and if I put anotehr condition with number of condition > 0, it still doesn't work..
thanks for help.

Similar Messages

  • SQL query doesn't work in VB program

    Hi:
    The following SQL query doesn't work into a VB program, I'm using Oracle OLEDB to established connection to the DB, ... the query returns 0 rows ...
    When I run this same query from any SQL Plus, works well (returning me something like 119 rows) ...
    Any clue or hint ??
    Thanks in advanced
    Angel Castro
    SELECT OPERADOR, ID_ALIMENTADOR, RB_FSC, NUM_CTROL, COND_OPERA, TRANSITORIO, PENDIENTES, ANORMAL, EDO_REAL, IDENTIFICADOR, CAUSA
    FROM HISTORICO_OPERACION
    WHERE (FECHA BETWEEN '20-AUG-2004' AND '5-NOV-2004')
    AND (HORA BETWEEN '10:00:00' AND '16:00:00')
    ORDER BY ID_ALIMENTADOR ASC;

    Is the column FECHA of datatype DATE?
    Are you running the query with the constant date looking like strings ('20-AUG-2004' in your post, for example) as-is from the VB program?
    If not, are you binding the parameters correctly?
    What is the setting of your NLS_DATE_FORMAT parameter?
    What happens if you do a
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'from your VB program before running the query?

  • The query doesn't work

    Hi kind people!
    I have udf  TEST on the picture. The query on the picture I have connected to the field Test and conected to field description too. But with the field Description the query doesn't work. U_Producer is the name of another field. Why does not it work?

    Hi Gordon!
    From the right I have UDF for choosing the spare parts of auto.  I want to add a spare part, for example to item master data (OITM). I enter every field step by step 1 - 4 by choosing frome use tables linked in every field. I choose fielf 1 (Brand) for example TOYOTA and in the use table of 2(Model) field i see only values that belong to TOYOTA that to say corolla, carina, vista and so on.  But to find any component  exactly i put on the loupe in the field 5 and see a table where all types of auto parts in the world but they are filtered with parametrs in 1-4 fields. I chhose needed component and get in the 5 field any code of a choosed part. Then i d liked to link the table of filed 5 to field Description too and to filter component with code in field 5 in order to get item description from the use table. I used the one method of filtering in all fields Here i see that i can to filter values using use fields but I don't use it in standart field description, although the usual selection of elements of any use table works. As a result a see that the problem that doesn't work the selection and filtration in the field description but it works in in UDF.

  • Form on a SQL Query - doesn't work with SELECT * - bug or feature ?

    When I do this,
    Create Page -> Page with Component -> Form -> Form on a SQL Query -> SELECT * FROM EMP
    I do not get any items displayed and it creates a simple HTML region / page. Do we have to necessarily specify the column names ?
    Iam looking at a way to see if any addition of columns in the table does not involve IT intervention in recreating the form.
    When we try to create with Form on a SQL Query, then shouldn't it be similar to the Report where the same thing works, if I give SELECT function_returning_columns() from DUAL even then the same thing happens where it creates an ITEM called functions_returning_columns() it creates HTML region
    I asked a related question with no answer :-( in
    Dynamic Creation of Items in Runtime through Application UI

    Hi Marc,
    Thanks. I just tried something like this. Taking the EMP table example, (it doesn't matter which table), I created a region based on a Pl/Sql function returning SQL query
    ( I selected the vertical report template including nulls to display it like a form ) :
    DECLARE
    v_sql VARCHAR2(3000) ;
    mn_idx NUMBER := 1 ;
    BEGIN
    v_sql := 'SELECT ' ;
    FOR recs IN (SELECT * FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = 'EMP' ORDER BY COLUMN_ID)
    LOOP
    v_sql := v_sql || 'HTMLDB_ITEM.TEXT(' || mn_idx || ',' ||
    recs.column_name || ') ' || recs.column_name || ', ' ;
    mn_idx := mn_idx + 1 ;
    END LOOP ;
    v_sql := SUBSTR(v_sql, 1, LENGTH(v_sql) -2) ;
    v_sql := v_sql || ' FROM EMP WHERE EMPNO = 7369 ORDER BY 1 ' ;
    RETURN v_sql ;
    END ;
    This allowed me to do my updates etc.., Then I created a button called 'Apply' and a process called 'update_changes' on button click and defined this:
    DECLARE
    v_sql varchar2(1000) ;
    mn_ctr NUMBER := 1 ;
    BEGIN
    v_sql := 'BEGIN UPDATE EMP SET ' ;
    FOR recs IN (select COLUMN_ID, COLUMN_NAME, DATA_TYPE
    from all_tab_columns where table_name = 'EMP'
    ORDER BY COLUMN_ID) loop
    -- Make changes here if required- this is assuming 9 columns --
    v_sql := v_sql || recs.column_name || ' = HTMLDB_APPLICATION.G_F0' || mn_ctr || '(1),' ;
    mn_ctr := mn_ctr + 1;
    end loop ;
    v_sql := substr(v_sql, 1, length(v_sql) - 1) ;
    v_sql := v_sql || ' WHERE EMPNO = 7369; END ;' ;
    execute immediate (v_sql) ;
    END ;
    Since this is for example, I didn't include code for Checksum and hardcoded empno = condition and have provision for 9 columns. I made some changes and tried saving it and I was able to do it.
    I altered the table to add a column / drop a column and when I relogin, Iam able to see the changes.
    Can you tell me if there could be any drawbacks in this approach ?.

  • Query doesn't work on my applicatio.

    Hi everyone,
    I have a trick query on my application, it goes something like this:
    I have a Shuttle Item, let's call it :P7_ID, with a dynamic action that everytime the shuttle change
    a page submit is triggered. Then I have this report, let's call it, employee Report, that uses the shuttle
    values to do it's query. The shuttle has this values that can be selected :1,2,3,4,5 and etc...
    The query of the report is this: Select * from employee where Id_employee in (replace(:P7_ID,':',','));
    I use the replace command to format the returning value of the shuttle as 1,2,3, for example, because
    when you select more than one value in the shuttle, it concatenates the values with a ':'.
    The query is returning "report error: ORA-01722: invalid number", probably because apex
    returns the value of the shuttle for the query as a string.
    It is possible to fix this problem, or do you guys have an better idea to do this query?
    Your help is very appreciated.
    Regards, Leandro Freitas.

    Hi,
    Here is document Working with Multiple Select List Item. It apply also to shuttle.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_item.htm#CEGDBEHF
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • WITH Clause query doesn't work in Oracle Reports.

    Hi Gurus,
    I'm using a WITH clause query and need to build a report using the same query.
    But when i'm trying to build a report, query is giving error as "WITH clause table or view doesn't exists".
    But the same query perfectly works in sql prompt.
    Oracle Reports doesn't supports WITH clause query?
    Please suggest.
    Thanks,
    Onkar

    I ran into a similar problem before and worked around it by moving the query to a pipelined function in the database as described at WITH clause unexpectedly causes ORA-00942 in Reports Builder
    Hope this helps.

  • [SOLVED] -- to_char (:A) = '192025ZMAR03' (in a query) doesn't work

    For custom query of a DATE (database) DATETIME (form) field
    to_char (:A) > '192025ZMAR03' or to_char (:A) <> '192025ZMAR03' or
    to_char (:A) <= '192025ZMAR03' works, BUT to_char (:A) = '192025ZMAR03' is not working :(
    Any ideas?
    iAS version is 10.1.2.0.2 , running on Linux. Related format mask is defined in the related forms column properties.
    Thank you
    Message was edited by:
    zaferaktan
    Message was edited by:
    zaferaktan

    BUT to_char (:A) = '192025ZMAR03' is not workingIt is not working for either of two reasons:
    1. The data in the database column contains a nonzero seconds time element. You are not providing one, so unless the rows have seconds set to exactly zero, the date and time are not equal.
    2. Your sessions default date format for your forms session is not DDHH24MI"Z"MONRR
    Since you do not give it a format to use, Oracle is using the default date format, which is usually DD-MON-YY.
    If you want to ignore the seconds in the time element, you need to add TRUNC(:A,'MI') to your condition, which truncates to the minute.
    To use both the correct datetime format and ignore the seconds, use this:
    to_char (trunc(:A,'MI'),'DDHH24MI"Z"MONRR') = '192025ZMAR03'However, you should NOT be converting the database data to character before doing the comparison. If you do, and you use the > or < operators, any day of the month > 19 will compare greater than your value, even 200159ZJAN03.
    The correct method would be this:
    trunc(:A,'MI') = to_date('192025ZMAR03','DDHH24MI"Z"MONRR')

  • Query doesn't work.

    I am declarin a cursor like this inside a pl\sql editor in Oracle Forms 6i:
    cursor customer_services is select * from Customers inner join Services on Customers.ServiceID=Services.ServiceID.
    And when i compile the followin error appears:
    Error 103:
    Encountered the symbol Join when expecting one of the following:
    If i remove the inner join the query works.I mean it doesn't accept joins.

    select * from Customers, Services where Customers.ServiceID(+)=Services.ServiceID That's an outer join.

  • Multiple rows in infopackage doesn't work

    Hi all,
    I have an infopackage and on the selection screen I want to enter 3 ranges for material:
    for example:
    from 1 -> 3000
    from 3002 -> 4000
    from 4002 -> 9999
    when I execute the infopackage, only the materials from the first range are loaded.
    when i delete my first interval, the materials from 3002 -> 4000 are loaded...
    why doesn't it work?
    Ciao
    Joke

    Hi,
    This may the issue with your datasource.
    you may get this issue if the datasource is generic and the selection definition is not proper.
    Ramesh

  • SQL Query doesn't work coccrectly

    The table includes list of month and years.
    When I write
    SELECT MONTH,YEAR FROM MONTH_DETAILS ORDER BY YEAR DESC,MONTH DESC;
    it works correcty and returns
    MONTH YEAR
    7 2009
    6 2009
    5 2009
    4 2009
    3 2009
    2 2009
    1 2009
    12 2008
    11 2008
    But when I want to return only the first one(month=7 and year=2009) and change query like this
    SELECT MONTH,YEAR FROM MONTH_DETAILS WHERE ROWNUM=1 ORDER BY YEAR DESC,MONTH DESC;
    it returns
    MONTH YEAR
    2 2009
    what is the problem?
    Both month and year fields are defined as numbers.

    Your query should be
    SELECT MONTH
          ,YEAR
    FROM (
          SELECT MONTH
                ,YEAR
                ,ROWNUM row_num
            FROM MONTH_DETAILS
           WHERE ORDER BY YEAR DESC,MONTH DESC
    WHERE row_num  = 1; Regards
    Arun

  • InvocationService.query() doesn't work for restarted cluster member.

    Hi,
    Thank you guys for that product, I'm very pleasured with Coherence cache.
    I will try to describe the following problem with Coherence.
    Our product integrated with Coherence cache and we have discovery/communication mechanism based on
    - MemberListener - to get events about cluster member;
    - InvocationService.query() - to communicate with remote member.
    I see that when node disconnected (wire break) MemberListener works fine. And after connection repaired sometimes cluster services on node stopped or restarted.
    I tested with 2 cluster islands and push/pull wire in my network router (2 coherence members on one side and 2 members on another side). Try to repair connection and see how cache merged.
    If node cluster services restarted I see that Member.getUid() changed for local member and MemberListener works fine for all nodes. But remote nodes can't send anything with InvocationService.query() to that restarted member!!!
    InvocationService.query() always return empty result when I try to send my AbstractInvocable to these restarted members in cluster.
    Could you help?
    I think there is bug...
    Best,
    Alex

    user4366011 wrote:
    Hi,
    Thank you guys for that product, I'm very pleasured with Coherence cache.
    I will try to describe the following problem with Coherence.
    Our product integrated with Coherence cache and we have discovery/communication mechanism based on
    - MemberListener - to get events about cluster member;
    - InvocationService.query() - to communicate with remote member.
    I see that when node disconnected (wire break) MemberListener works fine. And after connection repaired sometimes cluster services on node stopped or restarted.
    I tested with 2 cluster islands and push/pull wire in my network router (2 coherence members on one side and 2 members on another side). Try to repair connection and see how cache merged.
    If node cluster services restarted I see that Member.getUid() changed for local member and MemberListener works fine for all nodes. But remote nodes can't send anything with InvocationService.query() to that restarted member!!!
    InvocationService.query() always return empty result when I try to send my AbstractInvocable to these restarted members in cluster.
    Could you help?
    I think there is bug...
    Best,
    AlexHi Alex,
    could you please post your cache configuration file? Also, is the invocation service marked to be autostarted in the config file?
    Best regards,
    Robert

  • ASA5540 in multiple-context SNMP/icmp doesn´t work

    Hi there,
         I need some help in order to understante what´s going on with an asa540 configure in multiple-context mode.
         I Have a cacti server on my lan and now I´m try to monitoring the interface with snmp. When I try to get this information returns the error message:
         CISCOASA/CONTEXTA#
         JUN 11 2013 01:52:00: %ASA-1-1-6021: Deny UDP reverse path check from 10.6.6.6 to IP_SRV_CACTI on interface inside
        JUN 11 2013 01:52:01: %ASA-1-1-6021: Deny UDP reverve path check from 10.6.6.6 to IP_SRV_CACTI on interface inside
         If I try to ping returns the same error:
         CISCOASA/CONTEXTA#
         JUN 11 2013 01:56:09: %ASA-1-1-6021: Deny icmp  reverse path check from 10.6.6.6 to IP_SRV_CACTI on interface inside
        Following attached the conf of my asa
      My question is Why I can´t ping or even use snmp ???  
       If anyone could me help with a tip or a document about it ...
       My best regards
       Adriano    

    CISCOASA/CONTEXT# packet-tracer input inside icmp 10.132.0.25 8 0 10.6.72.2
    Phase: 1
    Type: ACCESS-LIST
    Subtype:
    Result: ALLOW
    Config:
    Implicit Rule
    Additional Information:
    MAC Access list
    Phase: 2
    Type: FLOW-LOOKUP
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Found no matching flow, creating a new flow
    Phase: 3
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   10.6.72.2       255.255.255.255 identity
    Phase: 4
    Type: ROUTE-LOOKUP
    Subtype: input
    Result: ALLOW
    Config:
    Additional Information:
    in   IP_SRV_HSLCACTIP01 255.255.255.255 inside
    Phase: 5
    Type: ACCESS-LIST
    Subtype:
    Result: ALLOW
    Config:
    Implicit Rule
    Additional Information:
    Phase: 6
    Type: IP-OPTIONS
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 7
    Type: INSPECT
    Subtype: np-inspect
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 8
    Type: INSPECT
    Subtype: np-inspect
    Result: ALLOW
    Config:
    Additional Information:
    Phase: 9
    Type: FLOW-CREATION
    Subtype:
    Result: ALLOW
    Config:
    Additional Information:
    New flow created with id 453866627, packet dispatched to next module
    Phase: 10
    Type: ROUTE-LOOKUP
    Subtype: output and adjacency
    Result: ALLOW
    Config:
    Additional Information:
    found next-hop 0.0.0.0 using egress ifc identity
    adjacency Active
    next-hop mac address 0000.0000.0000 hits 22196
    Result:
    input-interface: inside
    input-status: up
    input-line-status: up
    output-interface: inside
    output-status: up
    output-line-status: up
    Action: allow
    Route information:
    route inside 10.132.0.0 255.255.252.0 10.6.72.1 1
    route inside IP_SRV_HSLCACTIP01 255.255.255.255 10.6.72.1 1
    CISCOASA/CONTEXT# sh route
    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
           * - candidate default, U - per-user static route, o - ODR
           P - periodic downloaded static route
    Gateway of last resort is 200.206.50.233 to network 0.0.0.0
    C    200.206.50.232 255.255.255.248 is directly connected, outside
    S    10.132.0.0 255.255.252.0 [1/0] via 10.6.72.1, inside
    S    IP_SRV_HSLCACTIP01 255.255.255.255 [1/0] via 10.6.72.1, inside
    S*   0.0.0.0 0.0.0.0 [1/0] via 200.206.50.233, outside
    Regards,

  • Query doesn't work in APD, Error: column store error: fail to create scenario: [340 2048

    Hi Experts,
    We got a problem here.
    We have a query ran without any problems in RSRT. But when I try to put it as data sources(infoprovider) in APD.
    I got following error:
    column store error: fail to create scenario: [340 2048
    We are in BW731006 & ABAP731006.
    Any advise?
    Thanks in advance!
    Tengran

    Hi,
    Can you check this part in error mentioned by clicking as highlighted in red box. It will give you a correct idea about the issue ::
    Also share the detailed error with us as well.
    Best Regards,
    Arpit

  • Warranty lookup batch query doesn't work

    Hi
    I encounter a problem with warranty lookup batch query here :
    http://csp.lenovo.com/ibapp/il/WarrantyLookupBatch.jsp
    Every time i try to access this tool i get this error :
    An error occurred while processing your request.
    Reference #97.b1ef54b8.1422368820.2637a55b
    best regard

    hi
    Am i the only one who have this problem ?
    from this page :
    http://support.lenovo.com/fr/fr/warrantylookup
    I fellow the link : "Executer la requête par lots"
    Then I reach this page : http://csp.lenovo.com/ibapp/il/WarrantyLookupBatch.jsp
    with this error message :
    An error occurred while processing your request.
    Reference #97.95fa56b8.1422434472.25843ff  (Edit : => it seem that this value change)
    Can someone try this to confirm the problem from LENOVO or from me?
    best regard

  • Generic report query that will work against common table ..

    Context
    We have a custom audit log scheme that inserts all table changes into a backing table via triggers. For example, an insert into table ORDER would cause a insert into ORDER_AUD.
    Problem
    We want to build a generic report query that will work against any audit table.
    While constructing a report query for a class that uses inheritance, we see TopLink? add an extra where-clause.
    We are required to set the ReferenceClass? for the query, however, the tables we are querying are not mapped to TopLink?. We just want to map the query results to objects of the Reference Class.
    The extra where-clause specifies the table of the Reference Class, but since that table is not in the From clause, the query doesn't work.
    The ReportQuery? in Question
    public DatabaseQuery loadAuditHistory(Class cls, String audTableName ) {
    String emanAuditTableName = "eman_audit";
    ExpressionBuilder expressionBuilder = new ExpressionBuilder();
    Expression exp = expressionBuilder.getTable(audTableName)
    .getField("instance_id")
    .equal(expressionBuilder.getParameter("instanceId"))
    .and(expressionBuilder.getTable(audTableName).getField("audit_id")
    .equal(expressionBuilder.getTable(emanAuditTableName).getField("audit_id")));
    ReportQuery query = new ReportQuery(expressionBuilder);
    query.setReferenceClass(cls);
    query.setSelectionCriteria(exp);
    query.addArgument("instanceId");
    query.addAttribute("Changed By", expressionBuilder.getTable(emanAuditTableName).getField("audit_user"));
    query.addAttribute("Host", expressionBuilder.getTable(emanAuditTableName).getField("audit_host"));
    query.addAttribute("UTC Timestamp", expressionBuilder.getTable(emanAuditTableName).getField("audit_utc_timestamp"));
    query.addAttribute("Action", expressionBuilder.getTable(audTableName).getField("table_action_code"));
    Descriptor orderDescriptor = session.getDescriptor(cls);
    Vector mappings = orderDescriptor.getMappings();
    for (Iterator iter = mappings.iterator(); iter.hasNext();) {
    Object element = (Object) iter.next();
    if (element instanceof DirectToFieldMapping) {
    DirectToFieldMapping mapping = (DirectToFieldMapping)element;
    DatabaseField field = mapping.getField();
    String tableName = field.getTableName();
    String fieldName = field.getName();
    query.addAttribute(fieldName, expressionBuilder.getTable(audTableName).getField(fieldName));
    Expression version = expressionBuilder.getTable(audTableName).getField("version_id");
    query.addOrdering(version.descending());
    query.setName(GET_AUDIT_HISTORY);
    return query;
    Code Generated by the ReportQuery?
    SELECT t0.audit_user, t0.audit_host, t0.audit_utc_timestamp,
    t1.table_action_code, t1.INSTANCE_ID, t1.STATUS,
    t1.REQUESTER, t1.DESCRIPTION, t1.RECIPIENT
    FROM eman_audit t0, example_order_aud t1
    WHERE (((t1.instance_id = 60432)
    AND (t1.audit_id = t0.audit_id))
    AND (EXAMPLE_ORDER.CLASS_NAME = 'eman.infra.toplink.example.project.model.Order'))
    ORDER BY t1.version_id DESC
    Descriptor used to Map Oder.class
    public Descriptor buildOrderItemDescriptor() {
    Descriptor descriptor = new Descriptor();
    descriptor.setJavaClass(eman.infra.toplink.example.project.model.OrderItem.class);
    descriptor.addTableName("ORDERITEM");
    descriptor.addPrimaryKeyFieldName("ORDERITEM.INSTANCE_ID");
    // Inheritance properties.
    descriptor.getInheritancePolicy().setClassIndicatorFieldName("ORDERITEM.CLASS_NAME");
    descriptor.getInheritancePolicy().useClassNameAsIndicator();
    // Descriptor properties.
    descriptor.useSoftCacheWeakIdentityMap();
    descriptor.setIdentityMapSize(100);
    descriptor.useRemoteSoftCacheWeakIdentityMap();
    descriptor.setRemoteIdentityMapSize(100);
    descriptor.setSequenceNumberFieldName("ORDERITEM.INSTANCE_ID");
    descriptor.setSequenceNumberName("CIM_ID");
    VersionLockingPolicy lockingPolicy = new VersionLockingPolicy();
    lockingPolicy.setWriteLockFieldName("ORDERITEM.VERSION_ID");
    descriptor.setOptimisticLockingPolicy(lockingPolicy);
    descriptor.setAlias("OrderItem");
    // Query manager.
    descriptor.getQueryManager().checkCacheForDoesExist();
    //Named Queries
    // Event manager.
    // Mappings.
    DirectToFieldMapping instanceIdMapping = new DirectToFieldMapping();
    instanceIdMapping.setAttributeName("instanceId");
    instanceIdMapping.setFieldName("ORDERITEM.INSTANCE_ID");
    descriptor.addMapping(instanceIdMapping);
    DirectToFieldMapping ItemNumberMapping = new DirectToFieldMapping();
    ItemNumberMapping.setAttributeName("ItemNumber");
    ItemNumberMapping.setFieldName("ORDERITEM.ITEM_NUMBER");
    descriptor.addMapping(ItemNumberMapping);
    DirectToFieldMapping QuantityMapping = new DirectToFieldMapping();
    QuantityMapping.setAttributeName("Quantity");
    QuantityMapping.setFieldName("ORDERITEM.QUANTITY");
    descriptor.addMapping(QuantityMapping);
    OneToOneMapping orderMapping = new OneToOneMapping();
    orderMapping.setAttributeName("order");
    orderMapping.setReferenceClass(eman.infra.toplink.example.project.model.Order.class);
    orderMapping.setRelationshipPartnerAttributeName("orderItems");
    orderMapping.dontUseIndirection();
    orderMapping.addForeignKeyFieldName("ORDERITEM.ORDER_ID", "EXAMPLE_ORDER.INSTANCE_ID");
    descriptor.addMapping(orderMapping);
    return descriptor;

    I'm am very confused as to what you are trying to do, are you trying to query Order objects from the ORDER_AUD historical table instead of the table that the class is mapped to?
    TopLink 10.1.3 (DP3) has built in support for historization, you may wish to investigate this support to allow historical querying of your audit tables.
    In general you cannot use a ReportQuery to do this, a ReportQuery is for querying data from objects based on an object-level criteria. I think that you want to query objects, but just using different SQL than the descriptors are mapped to.
    You could do this through a custom SQL read query,
    i.e.
    ReadAllQuery query = new ReadAllQuery(Order.class);
    query.setSQLString("Select * from ORDER_AUD where INSTANCE_ID = #id");
    query.addArgument("id");
    Vector argumentValues = new Vector(1);
    argumentValues.add(id);
    List objects = (List) session.executeQuery(query, argumentValues);
    As long as the field names in the audit and the original table matched this would work. However if this is a historical table, then I would guess that there might be multiple objects with the same id, so querying these historical objects could confuse the TopLink cache. You could set dontMaintainCache() on the query to avoid this.
    In general you would probably be much better off having two sessions, one with the descriptors mapped to the normal tables, and one with the descriptors mapped to the audit tables. Then you would be able to query both using regular object-level queries.

Maybe you are looking for

  • Printing in Black and White problem

    Everytime I want to print in black and white I choose that option, click ok, then print.  The paper still comes out in color.  This happens on my work computer and my home computer.  I know it is not the printer because I can print word documents and

  • Contact disply problem in SMS and calls S850

    I have recently bought S850 from China and using it in Pakistan. When i saved any number without country code (0333xxxxxxx) incoming sms does not recognized the sender and sms incoming number shows with country code like +92 333 xxxxxxx. However, if

  • Transfer data from a Pop up to the main view

    Dear expert, i want to transfer data from a popup to the main view, i created a TEXT_EDIT UI-Element on my main View and on a popup, and when writing a text on the TEXT_EDIT UI-element on the popup, i want get it (or display it) on the TEXT_EDIT UI-E

  • Dual monitor use on iMac 24"

    Can I hook up another monitor to the iMac for dual monitor use. Looks like it can be done looking through the post, just want to make sure. Thanks

  • IPhone 3G intermittently not compatible with Apple Dock / Component Video

    I purchased a new Apple Dock and Component Video cable for my 3G. Both original Apple parts. On the first day it all worked perfectly. Now it seems I have a 50/50 chance of getting the "this device not compatible with iPhone - switch to airplane mode