How to get key from MDX Query

Hi All,
how to get key from mdx query ?
example :
SELECT [Measures].[67822GFASOU7KUT6FKHSQ34FV] ON COLUMNS NON EMPTY CROSSJOIN([ZCOMPANY].MEMBERS, [ZMILL].MEMBERS) ON ROWS FROM ZODS_GL/ZODS_GL_001
the result from this mdx query are zcompany text and zmill text, how to get company key and mill key ?
Regards
JeiMing

hi Jeiming,
to get key in mdx, you can try something like
[ZCOMPANY].[LEVEL01].MEMBERS
properties [ZCOMPANY].[2ZCOMPANY]
following threads may useful
Extracting texts with MDX
MDX Statement - display only keys for characterstics and their dis. attrib.
hope this helps.

Similar Messages

  • How to get values from a query string in URL in a jsf page?

    if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
    i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

    Hello,
    Try this:
    Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
    String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

  • How to get fieldnames from Select * query ?

    How can I get the fieldnames returned with a SELECT * query ?
    When I use GetFieldName or GetFieldOriginalName I only get fieldnames of "*".

    You should use the fields collection, in the OraDynaset object.
    All you need to do is :
    for i = 0 to Recordset.Fields.Count -1
    debug.print Recordset.Fields(i).name
    debug.print Recordset.Fields(i).OriginalName 'this will print the field's name before an alias
    next i

  • How to show only key in mdx query

    Hello Experts
    i have mdx query such as :
    SELECT
    [Measures].MEMBERS ON AXIS(0) ,
    NON EMPTY [ZCHANNEL].members
    Properties [ZCHANNEL].[2ZCHANNEL]
    ON AXIS(1)
    FROM ZIC_TPL/ZIC_TPL_DETAIL
    SAP VARIABLES
    [ZVSOCALM] INCLUDING [0CALMONTH].[200605]
    the result from this query are zchannel text and zchannel key
    how to show only zchannel key ?
    really appreciate your help.
    regards
    JeiMing
    Message was edited by: JeiMing Tjiam

    Hi Juice
    Yes, i have already tried setting zchannel as key only in my query
    but the result from mdx query still shown key and text
    Regards
    JeiMing

  • How to get key and text value of field "TNDRST" in VTTK from R/3 into BI

    There is one field call "TNDRST(Tender Status)" in SAP table VTTK in R/3. We can find  key value, but we are unable to find text for this field in VTTK. However we can see text value if we double click domain:TNDRST and go to value range.
    Questions, how to get key value and text of TNDRST together in BI. Do we need to create a master data source for TNDRST text information in R/3 and extracting into BI, if yes, how to? Are there any easy way to do it??
    Thanks,
    Sudree

    Hi Sudree,
    You need to create a generic Text Datasource to extract this information into BI System.
    1. Create a generic DS based on Table: DD07T
    2. The fields should be put in the extract structure.
              DOMNAME (Make this as Selection in the DS ) -
    Filter the Domain Name
              DOMVALUE_L -
    Key Value of Tender Status
              DDTEXT -
    Text / Description
              DDLANGUAGE -
    Language
    3. DD07T is the table with all the Domain names & their values, so in the Infopackage enter the Selection Value for DOMNAME as 'TNDRST' and then run it.
    Or you can create a view out of this table based on DOMNAME filter as 'TNDRST'.
    Regards,
    Chathia.

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • How to get keys of a particular type

    Following are my objects:
    DepartmentKey - primary key is departmentName, a String
    Department
    EmployeeKey - primary key is employeeId, an integer
    Employee
    I have 5 DepartmentKey-Department key-value entries in a cache and 2000 EmployeeKey-Employee key-value entries in the same cache.
    How do I get all the DepartmentKeys from the cache? In general, how to get keys of a particular type (class name)?
    Thanks
    Ghanshyam

    I guess I am deeply off track regarding the general approach towards storing items in the cache.
    Following is my problem domain:
    A Merchant is any establishment that accepts credit cards. (It could be the local Subway down the street or Macy's, etc.). A Transaction is a credit card transaction.
    public class Merchant implements Serializable{
    private String merchantId; // primary key
    private double averageTxnAmount;
    private double totalTxnAmount;
    private long totalTxnCount;
    public class Transaction implements Serializable{
    private String merchantId; // merchant that originated the txn
    private double amount;
    private Timestamp txnTime;
    private String txnType; // sale, return, etc.
    public class MerchantKey implements Serializable, KeyAssociation{
    private String merchantId;
    public Object getAssociatedKey{
    return merchantId;
    public class TransactionKey implements Serializable, KeyAssociation{
    private String merchantId;
    private Timestamp txnTime;
    private double amount;
    public Object getAssociatedKey{
    return merchantId;
    I want to update a merchant's average txn amount as transactions come in.
    Let's say I have a million merchants in a partitioned cache cluster spread across some machines.
    Transactions come into the cluster quite rapidly, say tens in a second. The process that inserts the transaction into the cluster must also update the merchant to which the transaction belongs, as follows:
    Transaction t = ...
    cache.put(tKey, t); // store the transaction into the cache
    MerchantKey mKey = new MerchantKey(txn.getMerchantId());
    Merchant m = (Merchant)cache.get(mKey);
    // update the merchant's avg txn amt
    m.setAverageTxnAmount((txn.getAmount() + m.getTotalTxnAmount())/m.getTotalTxnCount() + 1);
    m.setTotalCount(m.getTotalCount() + 1);
    // store the updated merchant back into cache
    cache.put(mKey, m);
    OR
    Transaction t = ...
    cache.put(tKey, t); // store the transaction into the cache
    MerchantKey mKey = new MerchantKey(txn.getMerchantId());
    Merchant m = (Merchant)cache.get(mKey);
    MerchantUpdater agent = new MerchantUpdater(t);
    cache.invoke(mKey, agent);
    public class MerchantUpdater implements AbstractProcessor{
    public Object process(Entry entry){
    Merchant m = (Merchant)entry.getValue();
    // update m's avg txn amt, total count using t
    entry.setValue(m);
    The basic idea is to store all merchants and all transactions (which could be tens of millions in a day) for a day in memory and to update the merchant objects as transactions come in throughout the day. The above example shows updating just the merchant's average txn amount, but in reality, it could be updating a number of things about the merchant.
    Am I using the api in the right spirit or is my approach seriously whacked? Can you please comment?
    Thanks
    Ghanshyam

  • How to pass text in MDX query

    Hi All,
    I was wondering how to pass text in MDX query.
    Below mentioned is my sample query and it is working fine.
    SELECT
    {[Measures].members} ON AXIS(0),
    NON EMPTY [0MATERIAL].[LEVEL01].MEMBERS
    *[0DOC_NUMBER].[LEVEL01].MEMBERS ON AXIS(1)"
    FROM [$ZTEST]"
    WHERE {[0MATERIAL].[000012345]} ";      
    But in data base 000012345 consists of material name as “ Pepsi “
    Now based on Pepsi I want to fetch results? Is it possible?
    Thanks in advance.

    Srinivas,
    So you are using JAVA, if you consult the developer's guide there is a section specifically addressing your question the ResultSet API should handle this via the formatted
    <b>Retrieving Result Sets
    ResultSet API</b>
    Note that the concept allows for more than two axes, however a two-dimensional, table-like data set makes the
    example easy to illustrate. On the columns axis, two members (“Store Cost” and ”Store Sales”) of the measures
    dimension have been selected; on the rows axis, three members (“Berlin,” ”Hamburg,” and ”Munich”) of the City level
    of a geographical hierarchy. The dataset has six cells:
    Cells provide four mandatory properties:
    • Value — supports all common column types, for example:
    o numeric types
    o dates
    o time values
    o strings
    o null
    • Data type — int value describing the data-type (see java.sql.Types)
    • Status — state of the cell (for example, error or null)
    <b>• Formatted value — a string representation of value</b>
    You can retrieve text in this manner.
    Do you want to be able to pass text as if it were a value as well?
    Cheers,
    Scott

  • How to get BOOLEAN from STORED FUNCTION

    We are calling legacy PLSQL stored procedures and functions via named queries. This has worked fine so far, but there are some functions which return the type 'BOOLEAN'. e.g.
    FUNCTION some_function( some_argument IN NUMBER) RETURN BOOLEAN;
    Where the return type is BOOLEAN calling the named query fails with
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    A couple of threads have hinted that what we are trying to do is not possible:
    How to get BOOLEAN from STORED PROCEDURES
    Re: Creating Named Query: from OracleCallableStatement
    This would possibly be due to 'restriction in the OCI layer'. Can anyone help? Is there really now way to call a valid PLSQL stored function via a named query when the return type is BOOLEAN?
    thanks

    I can't comment on possible issues you might have with the driver, but if it can be done in JDBC, it should be possible in TopLink.
    TopLink has the StoredFunctionCall which extends the StoredProcedureCall but adds an unnamed ouput parameter in the first spot of its parameter list. You will need to get the databasefield and set its type to BOOLEAN ie:
      DatabaseField returnField = (DatabaseField)yourStoredFunctionCall.getParameters().firstElement();
            returnField.setName(name);
            returnField.setSqlType(Type.BOOLEAN);Be sure not to use the setType() method, as I believe TopLink will try to use the Type.BIT when a boolean class is used as the classtype.
    Best Regards,
    Chris

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to Get Millisec from Sysdate

    Hello all
    How to get millisec from sysdate.
    Pls let me know da query ..

    You can't get milliseconds from SYSDATE. In 9i and upwards you can get them from a timestamp, whether it be from the built-in functions SYSTIMESTAMP and LOCALTIMESTAMP or a timestamp column/variable of your own.
    Unfortunately, Oracle only supplies the means to extract seconds, but fortunately, this includes the millilseconds, which are easy enough to get to as the following demonstrates:-
    SQL> select extract(second from localtimestamp) from dual;
    EXTRACT(SECONDFROMLOCALTIMESTAMP)
                   42.765535
    SQL> select mod(extract(second from systimestamp),1) from dual;
    MOD(EXTRACT(SECONDFROMSYSTIMESTAMP),1)
                          .181223Regards
    Adrian

  • How to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    how to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    Make sure Settings > iCloud > Photos > iCloud Photo Library (Beta) = "Off"
    Then sync your iPhone using iTunes and make sure your sync settings for photos are set correctly in iTunes.

  • I got a new computer and don't know how to get music from ipod touch to itunes library

    I recently got a new computer and don't know how to get music from my ipod touch to show on my itunes library. 

    You need to transfer the iTunes folder from the old computer to the new one.
    iTunes: How to move your music to a new computer (Mac or Windows):
      http://support.apple.com/kb/HT4527

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

Maybe you are looking for

  • Erro SOAP Receiver: handshake failure

    Pessoal, boa tarde. Tenho um Canal de Comunicação SOAP Receiver, com autenticação por usuário e senha. Ao enviar a requisição para o Channel, é gerado o seguinte erro: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <SAP:Error xmlns:SAP="h

  • Apple Power Macintosh G5 Dual Core (2.0) (M9590LL/A) WIRELESS OPTIONS

    HEY GUYS Is there a PCIe wirelesscard that will work with this lovely machine?

  • How do I get itunes to recognize my new ipod shuffle?

    How do I get itunes on my mac pro to recognize my new ipod shuffle?

  • How to use olap api

    i have generated cube with oracle 9.2.0.1.0 with star schema and now i want use directly access olap api from java programs ,what is the steps pls suggest me? i am little bit confused about that is there any examples with java progarams

  • How to make a DFF in read only mode

    Hi All There is a requirement to male an descriptive flexfield (in Puchasing PO Headers) i read only mode for all the users. So that user must not select any values, Is any way to do this. Any workaround is possible ? Regards