Subquery in select attributes

I don't think this is possible, I've exhausted every option I can think of to output this sql in toplink. I've searched the web and this forum but found no info about it. If it's not possible please let me know and I will move on to something else.
This is a simplified example of what I want to do in toplink:
select r.name, (select count(*) from items i where i.request_id = r.request_id), r.comments from requests r where r.requestor like '%FRED%' ... etc
I can get the subquery in the where clause fine, but I can't work out how to put it in the select part of the statement.
Thanks for your help!

Oh lookie at me, I'm replying to myself. Again.
If you want a subquery in the select attributes then gosh darn it use a function. Create an oracle function that does the subquery and add it as an attribute with:
query.addFunctionItem("numRequests", request.get("id"), "request_counter")

Similar Messages

  • Subquery as Select Attribute

    How would I do the following query using Toplink expressions:
    select a.something, ( select min(b.column) from b where b.fk = a.pk)
    from a
    where ...
    I have figured out how to do:
    select a.something
    from a
    where whatever = ( select min(b.column) ... )
    but when I try to add the subquery as an attribute instead of as part of the where clause, I get the following error:
    "The expression has not been initialized correctly. Only a single ExpressionBuilder should be used for a query.
    For parallel expressions, the query class must be provided to the ExpressionBuilder constructor, and the query's ExpressionBuilder must
    always be on the left side of the expression."
    Thanks.

    Group by clauses are for usage with aggregate functions. Since you don't have an aggregate function in your outer query, you don't need a group by clause in your outer query. Although you do have aggregate functions (count) in your sub-queries, since they are only on one column, you don't need a group by there either. Please see the corrected query below.
    SELECT DISTINCT pro.proj_name,
           a.doc_name,
           b.description,
           substr (b.CATEGORY,6) Doc_Type,
           TO_DATE (SUBSTR (a.delidate, 1, 7), 'YYYY-MM') open_date,
           a.status,
           (select COUNT(item_id) as cnt_maj
            from   day_cmcs_comment
            where  status IN ('CL', 'OP')
            AND    classification IN ('MA', 'NF')) cnt_major,
           (select COUNT(item_id) as cnt_mnr
            from   day_cmcs_comment
            where  status IN ('CL', 'OP')
            AND    classification IN ('ED', 'NC')) cnt_minor
    FROM   day_cmcs_comment a,
           day_cmcs_main b,
           gen_proj_catg gen,
           proj_cmcs_proj_mapping pro
    WHERE  pro.doc_name = a.doc_name
    AND    pro.proj_id = gen.other_id
    AND    a.doc_name(+) = b.name
    AND    pro.edition = b.edition
    ORDER  BY pro.proj_name

  • Selected Attribute in f:selectitem is missing ?

    Hello,
    In EA4, it was possible to write..
    <h:selectitem .... selected="true" />However, in the beta release, there is no "selected" attribute in <f:selectitem>.
    How do we specify the initial selected item in case of <f:selectitem> ?
    Ajay

    Fair enough !
    But, I would like to specify something like the following in the JSP..
    <h:selectone_radio id="searchType" value="#{CustomerSearch.searchType}">
      <h:selectitem item itemValue="01" itemLabel="Phone Number" />
      <h:selectitem item itemValue="02" itemLabel="Customer ID" />
      <h:selectitem item itemValue="03" itemLabel="Customer Name" />
    </h:selectone_radio>Ofcourse, I can set the default value of the property searchType in faces-config.xml
    or in the CustomerSearch bean constructor.
    But, I think the page author should be able to specify the default value for any
    selection item.
    Ajay

  • Problem using 'selected' attribute of dropDown component

    Valid Assumptions:
    1. Developer is not a novice
    2. Problem has been verified by third party
    3. Using Netbean 5.5 plus Visual Web Pack 5.5
    Problem:
    The 'selected' attribute of the webuijsf:dropDown throws 'Component Error'
    <webuijsf:dropDown... selected="#{address$CreateUI.addressFormBean.accessLevel}" />where:
    a. 'selected' is the object that represents the selection made from the available options
    b. 'accessLevel' is java.lang.String with get/setter methods
    ERROR:
    javax.el.ELException: javax.faces.el.PropertyNotFoundException: javax.el.PropertyNotFoundException: Target Unreachable, 'addressFormBean' returned null
         at javax.faces.component.ValueExpressionValueBindingAdapter.getType(ValueExpressionValueBindingAdapter.java:129)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueBinding(ValueTypeEvaluator.java:138)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.evaluateValueType(ValueTypeEvaluator.java:111)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:90)
         at com.sun.webui.jsf.util.ValueTypeEvaluator.getValueType(ValueTypeEvaluator.java:67)
         at com.sun.webui.jsf.component.ListSelector.processSelections(ListSelector.java:278)
         at com.sun.webui.jsf.component.ListSelector.getListItems(ListSelector.java:122)
         at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderList(ListRendererBase.java:376)
         at com.sun.webui.jsf.renderkit.html.ListRendererBase.renderListComponent(ListRendererBase.java:168)
         at com.sun.webui.jsf.renderkit.html.DropDownRenderer.encodeEnd(DropDownRenderer.java:78)
         at com.sun.webui.jsf.renderkit.html.AbstractDesignTimeRenderer.encodeEnd(AbstractDesignTimeRenderer.java:40)
         at com.sun.webui.jsf.renderkit.html.SelectorDesignTimeRenderer.encodeEnd(SelectorDesignTimeRenderer.java:131)
         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:848)
         :Thanks in advance.

    What object type for dropdown's items? selected property's type has to match dropdown's value.

  • ECMA 2.0 Select Attributes

    I am following the ECMA 2.0 example below:
    http://msdn.microsoft.com/en-us/library/windows/desktop/hh859566(v=vs.100).aspx
    I got the DB created like this:
    However, when I try to create the MA, I do not see anything under the "Select Attributes":
    Has anyone else experienced the same problem?
    Thanks,
    John

    What does your GetSchema function look like? 
            public Schema GetSchema(KeyedCollection<string, ConfigParameter> configParameters)
                Microsoft.MetadirectoryServices.SchemaType personType = Microsoft.MetadirectoryServices.SchemaType.Create("Person", false);
                myServer = configParameters["Server"].Value;
                myDB = configParameters["Database"].Value;
                myTable = configParameters["Table"].Value;
                DataSet myData = this.SQLSchema(myServer, myDB, myTable);
                string[] SQLSchema = new string[myData.Tables["Columns"].Rows.Count];
                for (int i = 0; i <= myData.Tables["Columns"].Rows.Count - 1; i++)
                    SQLSchema[i] = myData.Tables["Columns"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
                    string myattrib = SQLSchema[i];
                    if (myattrib == "EmployeeID")
                        personType.Attributes.Add(SchemaAttribute.CreateAnchorAttribute(myattrib, AttributeType.String));
                    else
                        personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute(myattrib, AttributeType.String));
                Schema schema = Schema.Create();
                schema.Types.Add(personType);
                return schema;
            public DataSet SQLSchema(string server, string database, string table)
                myConnection = ("Server = '" + server + "';Initial Catalog='" + database + "';Integrated Security=True");
                conn = new SqlConnection(myConnection);
                cmd = new SqlCommand();
                cmd.CommandType = CommandType.Text;
                string cmdText = "Select COLUMN_NAME from Information_Schema.Columns where TABLE_Name = '" + table + "'";
                cmd.CommandText = cmdText;
                cmd.Connection = conn;
                adapter = new SqlDataAdapter(cmd);
                da = new DataSet();
                adapter.Fill(da, "Columns");
                return da;

  • How to access Selection Attribute Filter Key on a TG through CRMD_MKTTG* ??

    Hello,
    We need to apply all the attributes filters on a TG (for instance city filter) for searching an address  that comply with the filters.
    To create a segment at CRMD_MKTSEG transaction for using it later in a campaign, it could be done by 3 ways:
    1. Create a simple profile
    2. Create a target group: create a profile and build the targe group
    3. Create a profile set: create a profile and build for profile set
    When creating first the profile, it is possible to apply attributes filters. This atributes filters are stored in BD tables of marketing. We are able to find the filters for the first and third case, but not for second case.
    I proceed to explain the first and third case:
    CRMD_MKTTG_TG_H: CRM Marketing: Target Group Header Data
         GUID: CRM Marketing: GUID of Target Group (this data I know beforehand)
         SET_H_GUID: CRM Marketing: GUID Profile Set
         SET_GUID: CRM Marketing: GUID Profile Set
         PROF_GUID: CRM Marketing: GUID of a Profile
    For the first case directly we do a select on CRMD_MKTTG_PF_S where  PF_GUID = CRMD_MKTTG_TG_H-PROF_GUID:
    CRMD_MKTTG_PF_S: CRM Marketing: Selection Criterion of a Profile
         GUID:CRM Marketing: GUID for a Target Group Selection Criterion
         PF_GUID: CRM Marketing: GUID of a Profile
    For the third case we do select on CRMD_MKTTG_PF_H where SET_GUID = CRMD_MKTTG_TG_H-SET_H_GUID and we retive GUID:
    CRMD_MKTTG_PF_H: CRM Marketing: Profile
    GUID: CRM Marketing: GUID of a Profile
    SET_GUID     :CRM Marketing: GUID Profile Set
    Then  we do select select on CRMD_MKTTG_PF_S where  PF_GUID = CRMD_MKTTG_PF_H-GUID.
    And we can obtain the filters through:
    .INCLUDE     CRMT_MKTTG_PF_S_RANGE:CRM Marketing: Selection Range
    SEL_SIGN: CRM Marketing: Component SIGN for Selection Criterion
    SEL_OPTION: CRM Marketing: Component "OPTION" for Selection Criterion
    SEL_LOW     : CRM Marketing: Component "LOW" for Selection Criterion
    SEL_HIGH     :CRM Marketing: Component "HIGH" for Selection Criterion
    But what about the second case that correspond to CRMD_MKTTG_TG_H-SET_GUID?
    Could somebody explain how to access the filters when the second case happen? ¿What relationship MKT tables is based on?
    I would appreciate any suggestion.
    Best regards,
    Rosa
    Edited by: Carlos de Cozar on Feb 15, 2008 12:13 PM
    Edited by: Rosa on Feb 20, 2008 9:42 AM

    Can you please let me know how I can find out the duplicate record.
    you need to split the records from flat file structure into your internal table ans use a delete ADJACENT duplicates comparing fields
    split flat_str into wa_f1 wa_f2 wa_f2 at tab_space.

  • USING SUBQUERY IN SELECT STATEMENT

    I am looking at reusing the results of a first query in a second select statement.
    I have a first table "ACTIVE_FIELDS" in which I maintain the columns I want to query.
    Table name ACTIVE_FIELDS
    Field - Status
    CODE - ACTIVE
    DESCRIPTION - ACTIVE
    NAME - INACTIVE
    So I get the list of active fields by doing :
    SELECT FIELD FROM ACTIVE_FIELDS WHERE STATUS=ACTIVE
    It gives me : Code and Description.
    I have then a second table MATERIAL with 3 columns CODE, DESCRIPTION and NAME.
    I am looking at doing a query against MATERIAL table as follows
    SELECT (SELECT FIELD FROM ACTIVE_FIELDS WHERE STATUS=ACTIVE) from MATERIAL and I expect to only get columns CODE and DESCRIPTION in the result.
    If I want to add the NAME field in the result of my query, I just have to change status of NAME field in the eh ACTIVE_FIELDS table..
    Can anybody help me with the exact syntax, I must miss a function to convert the result of the first query..

    that data model looks suspiciously like an attribute-value generic model, thus the need for that funky sql.
    read this thread.
    Re: SIMPLE Database Design Problem !

  • Subquery in Select Statement

    Hi,
    In crystal reports 10 is there a way to alter the select statement to include a subquery into the select statement.  For example
    select customer.lastname from customer;
    to be
    select customer.lastname , (select departmentname from dept where customer.dept_id= dept.dept_id) as "Customer_DeptName"
    from customer;
    I don't know how to do this in crystal but this can easily be done in toad or other sql query tool.
    Please advise.
    Thanks.
    Tom.

    hi Tom,
    i walk through how to create a sub select (using a command object instead of using tables) in this post here...
    http://scn.sap.com/community/crystal-reports/blog/2012/07/11/show-all-sub-groups-and-a-summary-for-every-group
    cheers,
    jamie

  • Using Subquery in Select with Rollup (or some way to get grand total)

    I am trying to do the following (simplified the query):
    SELECT s.SYSTEM,
    (SELECT COUNT(cp1.cid) FROM cfrs cp1, systems sp1, subsystems ssp1 where cp1.priority = 'P1' AND cp1.subsystem = ssp1.subsystem AND sp1.system = ssp1.system AND sp1.system = s.system) AS P1
    FROM cfrs c, systems s, subsystems ss
    WHERE c.subsystem = ss.subsystem
    AND s.system = ss.system
    GROUP BY ROLLUP(s.SYSTEM)
    But the result of the Rollup on the P1 column is always 0 (it is not summing it up)
    How can I accomplish a Rollup (or get a grand total) of the subquery result?
    Thanks,

    How about this then:
    SQL &gt; WITH SYSTEMS AS
      2  (
      3     SELECT 'A' AS SYSTEM FROM DUAL UNION ALL
      4     SELECT 'B' AS SYSTEM FROM DUAL UNION ALL
      5     SELECT 'C' AS SYSTEM FROM DUAL
      6  ),
      7  SUBSYSTEMS AS
      8  (
      9     SELECT 'A' AS SYSTEM, '1' AS SUBSYSTEM FROM DUAL UNION ALL
    10     SELECT 'A' AS SYSTEM, '2' AS SUBSYSTEM FROM DUAL UNION ALL
    11     SELECT 'A' AS SYSTEM, '3' AS SUBSYSTEM FROM DUAL UNION ALL
    12     SELECT 'B' AS SYSTEM, '4' AS SUBSYSTEM FROM DUAL UNION ALL
    13     SELECT 'B' AS SYSTEM, '5' AS SUBSYSTEM FROM DUAL UNION ALL
    14     SELECT 'B' AS SYSTEM, '6' AS SUBSYSTEM FROM DUAL UNION ALL
    15     SELECT 'C' AS SYSTEM, '7' AS SUBSYSTEM FROM DUAL UNION ALL
    16     SELECT 'C' AS SYSTEM, '8' AS SUBSYSTEM FROM DUAL UNION ALL
    17     SELECT 'C' AS SYSTEM, '9' AS SUBSYSTEM FROM DUAL
    18  ),
    19  CFRS AS
    20  (
    21     SELECT 10 AS CID, '1' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    22     SELECT 11 AS CID, '1' AS SUBSYSTEM, 'LOW' AS PRIORITY FROM DUAL UNION ALL
    23     SELECT 12 AS CID, '1' AS SUBSYSTEM, 'MED' AS PRIORITY FROM DUAL UNION ALL
    24     SELECT 13 AS CID, '2' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    25     SELECT 14 AS CID, '2' AS SUBSYSTEM, 'MED' AS PRIORITY FROM DUAL UNION ALL
    26     SELECT 15 AS CID, '2' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    27     SELECT 16 AS CID, '3' AS SUBSYSTEM, 'LOW' AS PRIORITY FROM DUAL UNION ALL
    28     SELECT 17 AS CID, '3' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    29     SELECT 18 AS CID, '4' AS SUBSYSTEM, 'MED' AS PRIORITY FROM DUAL UNION ALL
    30     SELECT 19 AS CID, '5' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    31     SELECT 20 AS CID, '5' AS SUBSYSTEM, 'LOW' AS PRIORITY FROM DUAL UNION ALL
    32     SELECT 21 AS CID, '6' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    33     SELECT 31 AS CID, '7' AS SUBSYSTEM, 'LOW' AS PRIORITY FROM DUAL UNION ALL
    34     SELECT 41 AS CID, '8' AS SUBSYSTEM, 'HIGH' AS PRIORITY FROM DUAL UNION ALL
    35     SELECT 51 AS CID, '9' AS SUBSYSTEM, 'MED' AS PRIORITY FROM DUAL UNION ALL
    36     SELECT 61 AS CID, '9' AS SUBSYSTEM, 'MED' AS PRIORITY FROM DUAL
    37  )
    38  SELECT DECODE(SYSTEM,'ALL_SYSTEMS','Grand Total',SYSTEM) AS SYSTEM
    39  ,  MAX(DECODE(PRIORITY,'LOW',CNT,0))       AS LOW
    40  ,  MAX(DECODE(PRIORITY,'MED',CNT,0))       AS MED
    41  ,  MAX(DECODE(PRIORITY,'HIGH',CNT,0))      AS HIGH
    42  ,  MAX(DECODE(PRIORITY,'ALL_PRIOR',CNT,0)) AS SYSTEM_TOTAL
    43  FROM
    44  (
    45     SELECT DECODE(GROUPING(SYSTEMS.SYSTEM),1,'ALL_SYSTEMS',SYSTEMS.SYSTEM) AS SYSTEM
    46     , DECODE(GROUPING(CFRS.PRIORITY),1,'ALL_PRIOR',CFRS.PRIORITY) AS PRIORITY
    47     , COUNT(*) AS CNT
    48     FROM SYSTEMS
    49     JOIN SUBSYSTEMS ON SYSTEMS.SYSTEM = SUBSYSTEMS.SYSTEM
    50     JOIN CFRS ON SUBSYSTEMS.SUBSYSTEM = CFRS.SUBSYSTEM
    51     GROUP BY CUBE(SYSTEMS.SYSTEM,CFRS.PRIORITY)
    52     ORDER BY SYSTEMS.SYSTEM, CFRS.PRIORITY
    53  )
    54  GROUP BY DECODE(SYSTEM,'ALL_SYSTEMS','Grand Total',SYSTEM)
    55  ORDER BY DECODE(SYSTEM,'ALL_SYSTEMS','Grand Total',SYSTEM)
    56  /
    SYSTEM             LOW        MED       HIGH SYSTEM_TOTAL
    A                    2          2          4            8
    B                    1          1          2            4
    C                    1          2          1            4
    Grand Total          4          5          7           16Oh, BTW, use "code" wrapped in "{}" on either side to post nicely formatted code.

  • Subquery in SELECT list vs join

    If I'm not mistaken, both queries below are functionally the same. Both return all rows from table1 and only show a value for table2.F7 if the first 4 characters of F7 equal F2.
    My thoughts are this... It's nice that a subquery can be used in a select list, but it looks like, with all the sql I've written which uses that approach, I could have just as well used the join approach. Is this always true? Can someone show me as example where using a subquery in the select list is hands-down the better approach?
    SELECT table1.F2,
    (SELECT table2.F7 FROM table2 WHERE substr(table2.F7,1,4) = table1.F2)
    FROM table1
    SELECT table1.F2, table2.F7
    FROM table1, table2
    WHERE table1.F2 = substr(table2.F7,1,4)(+)
    Let me add that, in my top example, multiple rows will never be returned by the subquery. If that were the case, then the join approach would be the only option.
    Message was edited by:
    Nick2012

    Probably there is no general answer and you'll always have to check separately.
    In the following example the scalar subquery turns out to be slightly more efficient than an outer join (15 gets versus 13 gets and compare the elapsed time):
    SQL> SET autotrace traceonly explain statistics
    SQL> SET timing on
    SQL>
    SQL> SELECT ename, (SELECT dname
      2                   FROM dept d
      3                  WHERE d.deptno = e.deptno) dname
      4    FROM emp e
      5  /
    14 rows selected.
    Elapsed: 00:00:00.72
    Execution Plan
    Plan hash value: 2981343222
    | Id  | Operation                   | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |         |    15 |   135 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| DEPT    |     1 |    11 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | PK_DEPT |     1 |       |     0   (0)| 00:00:01 |
    |   3 |  TABLE ACCESS FULL          | EMP     |    15 |   135 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("D"."DEPTNO"=:B1)
    Statistics
              0  recursive calls
              0  db block gets
             13  consistent gets
              0  physical reads
              0  redo size
            742  bytes sent via SQL*Net to client
            381  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             14  rows processed
    SQL> SELECT ename, dname
      2    FROM emp e, dept d
      3   WHERE d.deptno(+) = e.deptno
      4  /
    14 rows selected.
    Elapsed: 00:00:00.74
    Execution Plan
    Plan hash value: 3387915970
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |    15 |   300 |     7  (15)| 00:00:01 |
    |*  1 |  HASH JOIN OUTER   |      |    15 |   300 |     7  (15)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| EMP  |    15 |   135 |     3   (0)| 00:00:01 |
    |   3 |   TABLE ACCESS FULL| DEPT |     5 |    55 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("D"."DEPTNO"(+)="E"."DEPTNO")
    Statistics
              0  recursive calls
              0  db block gets
             15  consistent gets
              0  physical reads
              0  redo size
            666  bytes sent via SQL*Net to client
            381  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             14  rows processed

  • Feature request: remember selected attribute in wizard

    Hi,
    I often find myself doing this:
    - In the entity object wizard, select the 'attributes' tab
    - Click on an attribute
    - Select the 'Attribute settings' tab
    First feature request: It would be nice if the attribute settings tab would now show the properties of the attribute I last selected on the other tab, instead of the first attribute.
    Second feature request: It would be nice if you could open the attribute settings of an attribute directly from the attributes tab. (perhaps via a right-click -> properties contextmenu).
    Greetings,
    Ivo

    Filed bug#2564815 to track request number 1.
    If we implement that, then I don't think you'll also need request #2. It will be just one click away
    by changing the panel.

  • Change image according to selected attribute

    Hi ,
    I know there is lot of forum post around.
    I still haven't managed to get that sorted.
    I have created a product - I have set it up and it show nice big pciture.
    In attributes, I have created colors : 4 images of the same product ( diffrent color ofc )
    In Site Mangeer - Module templates - Shop - Individual Product -Large
    I have included
                   {tag_attributes}
    Which works fine ofc - So on my page i see  the product - dropdown box for the colors.
    next from the this page ; http://helpx.adobe.com/business-catalyst/partner/product-inventory.html#id_12613
    I use the code on the bottom of the page :
    <script>
    $(function(){
            var product = {tag_product_json};
            var attributes = {tag_attributes_json};
            var divId = "#catProdTd_"+product.productId;
            $(divId).find("select").change(function (){
                      var selected = $(this).val();
                      var option = attributes.options[selected];
                      if(option && option.image)
                         $(divId).find("img").attr("src", option.image);
    </script>
    I have inserted that in the same page as i inserted the tag_attributes
    I'm not really sure what im doing wrong.
    I thought it could be the, name of the images, or the code should be on top of the page/bottom.
    Any suggestions?

    I am interested in doing this as well. Did anyone have any suggestions?
    Josh

  • Selecting attributes in a cube

    I have two cubes which both have the info object 0SHIP_TO.
    When building a query using one of the two cubes I can select several attributes that belong to 0SHIP_TO.  They appear under the same dimension table as 0SHIP_TO.  NOTE: The attributes do not appear UNDERNEATH 0SHIP_TO but appear selectable at the same exact level as 0SHIP_TO.  In other words I don't have to first click 0SHIP_TO in order to see all the various attributes.  I think it treats them like this because the are navigation attributes.
    Now, when I attempt to query from the second cube I can not see ANY attributes of 0SHIP_TO.
    What triggers the attributes of info object 0SHIP_TO to be seen in one cube and not the other??
    CLUE: If I use RSA1 and go directly into the first cube I can select all of the attributes of 0SHIP_TO.  Somehow in the technical name it appends 0SHIP_TO such as;
    0SHIP_TO____ZBROKER
    0SHIP_TO____ZRSM
    0SHIP_TO____0COUNT
    etc....
    Thanks for your help.
    -Patrick

    Hi Patrick,
    Even though you have them as nav attr of SHIP_TO, you need to turn on the nav attr flag in the cube definition too. On the Char tab in Cube > Edit, you will see a button called Nav. Attributes. Click this and check the attributes that you want to see in the query designer. Save and actiavte the cube. Then re log in into BEx and you should be able to see them.
    Hope this helps...

  • Subquery to select maximum date

    I am trying to work in a subquery that captures only the most recent scheduled hearing date, without converting the entire report to a command statement. Is there a way to do that? I've been trying using formula fields and sql expression fields without finding anything that works.
    Here's the statement I'm trying to bring in:
    SELECT MAX(AOR_DTE) FROM LDS_AR_OC WHERE AOR_OCY_CTG_TYP = 'PC HEARING' AND AOR_ODT_CTG_TYP = 'PRIOR SCHEDULED' AND AOR_ATY_PRPS_CDE = '{?aty}' AND AOR_AR1_SEQ_nUM = {?ar1seq}
    Originally I had this as a subreport, which worked great, but it is a subreport to a subreport and gets stripped out when I place the first subreport onto the main report.
    I also looked at moving the data from the detail section to the group footer and sorting date in descending order, but the other data on the same row is meant to be detailed so that didn't work.
    Allison

    If your database table isn't huge, put your query into an SQL Command:
    SELECT AOR_ATY_PRPS_CDE, AOR_AR1_SEQ_nUM, MAX(AOR_DTE)
    FROM LDS_AR_OC
    WHERE AOR_OCY_CTG_TYP = 'PC HEARING'
    AND AOR_ODT_CTG_TYP = 'PRIOR SCHEDULED'
    group by AOR_ATY_PRPS_CDE, AOR_AR1_SEQ_nUM
    then linking it to your other data on AOR_ATY_PRPS_CDE, AOR_AR1_SEQ_nUM should do it...  (If the table is large, this may be a bit slow, unless you could add parameters to limit the aggregation...)
    Just out of curiosity, why are you putting one report into another?  I've read this a lot lately, but don't quite understand the purpose, unless there is an absolute requirement that the output be all in one file.  (It sounds like you just want to run the reports together.  You could achieve this with object packages in BOE...) 
    HTH,
    Carl

  • How to display selected attributes

    In BC4J +UIXML ,Using <setRegion> We can display automaticly all of the attributes of a ViewObject.But how to select some of them to display?
    not:
    <bc4j:region automatic="true">
    <!-- the stamp for each attribute -->
    <bc4j:attrStamp>
    <bc4j:messageInput readOnly="true"/>
    </bc4j:attrStamp>
    </bc4j:region>
    PacsDemonstrationId 43548
    PacsDemonstrationCode INN I
    PacsDemonstrationName Innere 1
    I dont need the first Pacs...Id here. how can I do it?
    Thanks
    Yong GE Germany

    2 ways:
    - replace the b4cj region and attrstamp stuff by single messageInput tags for each desired attribute.
    - define the viewobject in the bc4j application module with only the attributes necessary.
    i would recommend the latter because this is usually part of the business logic.
    trevi

Maybe you are looking for

  • Creating a Web Dynpro Application Accessing ABAP Functions

    Hi all,             I implemented Creating a Web Dynpro Application Accessing ABAP Functions .But recently i heared a new word BW query.Is it not wat i did in the above application or is this a new backend sytem , does  it have a new procedure to cre

  • How can i update to ios 6.1.3 on my model 1219

    i have tried to update my ipad model 1219 to ios 6.1.3 and also 7. with the current ios it will not download many of the apps and other things I'd like to have on it. Is there any other way to download this ios.? I have tried to go thru itunes etc an

  • V$Session module attribute is null

    Hi all, 1. What is the use of the module attribute in V$SESSION 2. I have a DB link with another DB server and while using that link like "select sysdate from emp@dblink " with in my procedure, i have found the module attribute of v$SESSION is null,

  • 5233: Can't Find My Memory Card

    I have just purchased and can't find memory card option, please help me where to find it Solved! Go to Solution.

  • About Dreamweaver templates

    This question was posted in response to the following article: http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7acca.h tml