Suppress "Distinct" Clause from Answers Query

Hello All:
How can I suppress the "Distinct" clause that the BI Server issues to the Oracle Database?
For Ex:
I have a customer Table with FirstName and LastName as columns. If I Query FirstName and LastName in Answers, BI server sends a Query like this:
select distinct T8944.fname as c1,
T8944.lname as c2
from
CUSTOMER T8944
order by c1, c2
This will suppress customers having the same name even if their customer Id is different. I want their names included also.
I would appreciate your help.
Thanks
rkingmdu

AFAIK, there's no config setting or so to prevent this implicit grouping. What you can do though is to add the customer Id ot the report and make the column hidden (Column Format - Hide).
Hth,
Chris
Edited by: Christian Berg on Sep 25, 2008 4:39 PM:
Or what Matt said ;-) Should type faster...

Similar Messages

  • Suppress "Order By" clause in Answers Query

    Hello,
    Is it possible to Suppress "Order By" clause in Answers Query.
    I'm using a database view as data source. In the view definition, "order by" clause is already specified. Is it possible to get the same order in the OBIEE report??
    I do not want to use Sort Order column in the repository.
    Thanks,
    Girish

    You add a rownumber to your DB view and use that to 'sort' your report.
    regards
    John
    http://obiee101.blogspot.com/

  • How to get Distinct Values from Answers

    Hi,
    How to get Distinct values from answers, i've tried to put some functions on it.
    Thanks,
    Malli

    Malli,
    Are you trying to fetch data from Dimension Attr OR Fact Measures? Did you try the advance tab - > Advanced SQL Clauses - > Check this box to issue an explicit Select Distinct.

  • Avoid distinct clause in the query

    hi i have a query from a single table using distinct clause and has columns (a,b,c,d,e,f,g,h,i)
    eg: select distinct a,b ,c,d from table
    where a<>0 and b<>0 and c<>0 and d<>0 and e=o and f=0 and g=0 and h=0 and i=0 ;
    when i see the execution plan with out distinct... it performs a bit faster.
    how do i remove distinct clause and make the query perform better
    this particular query is used as inline view in my vieiw . it is used in from clause .
    please suggest
    second question.... iam getting bitmap index to rowid conversion ...is this good? does it hamper performance . how to avoid this?
    regards
    raj
    Edited by: raj_fresher on Jul 17, 2009 7:48 AM

    Hi Raj
    what is e in the query ?It is the column name you provided yourself in your own unformatted example.
    After 400+ posts I thought you would understand that it's not that hard to put this exact tag => (yes, 6 characters, 4 letters between 2 curly brackets) before and after your code examples or sample data or explain plans.
    That way you maintain formatting and improve readability for us poor readers by magnitudes.
    But, I'm sure you'll succeed as well as all the others who can.
    I always look on the bright side.
    Example:
    Earlier this week another Raj also finally got enlightened about it, and his life has since then changed forever!
    +He drives a Bentley now, you know+ ;)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • GROUP BY and DISTINCT clause in single query

    Hi All,
    I have this query:
    SELECT studyid,baseline_no,trans_date, min(trunc(compass_date)),drug_related_yn
    FROM cp_bdr_trigger_tbl cbtt
    WHERE NOT EXISTS (SELECT 1
    FROM cp_patient_info_tbl
    WHERE studyid = cbtt.studyid
    AND baseline_no = cbtt.baseline_no)               
    AND studyid = '0431-020'
         GROUP BY BASELINE_NO,STUDYID,DRUG_RELATED_YN;
    The o/p of this query has around 20 rows with same studyid and distinct baseline_no.
    Now I want to select the data all to be distinct by limiting it somehow by GROUP BY clause.
    Is this possible?
    I mean grouping should be done in such a way that it should return distinct values only...
    The o/p of this query is input to other query for insertion in some table.
    * there is a Unique index in the target table on studyid+basline_no combination so the combination has to be unique*
    Thanks,
    Aashish S.

    The GROUP BY is in a way an implied DISTINCT because it will return ONE record for each of the columns identified in the GROUP BY clause.
    Either way your requirements aren't very clear. If you can please post the following we may be able to help:
    1. Oracle version (e.g. 10.2.0.4)
    2. CREATE / INSERT statements with sample data
    3. Expected output
    4. Use \ tags (surround #2 and #3 in these tags)
    5. Explanation of logic in achieving #3.
    Thanks!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with performance of a query having order by, distinct clause

    Hi,
    I have a problem with queries having order by, distinct clause.
    While its executing its taking lot of time. With DBMS_PROFILER identified the queries taking long time.
    The table is having approximately 70 million rows.
    Problem -1
    select * from table_name order by col1;
    select distinct col1,col2 from table_name;
    Here i am having 2 solutions request to let me know whether i am right if not suggest me right solution.
    Solution1:
    Max parallel servers is 8.
    select /* + parallel(table_name,8) */ * from table_name order by col1;
    select /* + parallel(table_name,8) */ distinct col1, col2 from table_name ;
    Solution-2:
    select /* + first_rows */ * from table_name order by col1;
    select /* + first_rows */ distinct col1, col2 from table_name ;
    Problem-2
    I am having a query with where condition on columns.
    Select * from table_name where col1='value1' and col2!='value2';
    Index created on col1 and col2.
    As we no that not equal won't use index as it is a composite index it should use the lead column. but its not using the index.
    Should i forcibly use index with hint or suggest me better solution.
    Any help really appreciated.
    Thanks in advance

    unique wrote:
    The table is having approximately 70 million rows.
    select * from table_name order by col1;Do you really want 70,000,000 rows from your table without any restrictions ? And furthermore ordered output ? I honestly understand the slowness of that query.
    Here i am having 2 solutions request to let me know whether i am right if not suggest me right solution.Who knows if you choosed the right solution. I would suggest to reconsider your query and the need of 70,000,000 returned rows.
    Problem-2
    I am having a query with where condition on columns.
    Select * from table_name where col1='value1' and col2!='value2';Please, provide the explain plan, eventually the tkprof output could also help. And tables descirption AND indexes description.
    And OS and Oracle version.
    Nicolas.

  • I found out issue distinct clause in query ,refcursor not returning rows

    URGENT
    hi the following procedure returns records  but when i add  distinct clause to (open v_refcursor for select )
    i.e   open v_refcursor for select distinct column1,column2   .......... in the procedure the procedure is not returning records. please help what is the issue here?
    CREATE OR REPLACE procedure proc_shared_report3 (in_cust_id varchar2,in_user_array user_tab , in_acct_array acct_tab,in_report_pvlg_hier varchar2,in_fmt_pvlg_hier varchar2,v_refcursor OUT sys_refcursor)
    is
    BEGIN
    if  in_acct_array.count>0 and in_fmt_pvlg_hier is not null and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null  then
    dbms_output.put_line('all are not null');
    *open v_refcursor for  select usr_id* from vw_get_user_profile where usr_id in (
            SELECT USR_ID FROM VW_GET_ACCOUNTS WHERE USR_ID IN (SELECT distinct up1.usr_id FROM vw_get_user_privileges up1,vw_get_user_privileges up2  WHERE 
            up1.usr_id=up2.usr_id and
            up1.product_hierarchy=in_report_pvlg_hier  and up2.PRODUCT_HIERARCHY=in_fmt_pvlg_hier AND up1.usr_id in (select usr_id from vw_get_user_for_customer where
            cust_id=in_cust_id)
            and up1.usr_id Member Of in_user_array) AND acct_nb Member of in_acct_array);
    /* if account list is null and rest all  not  null */
    elsif (in_acct_array is null or in_acct_array IS EMPTY or in_acct_array.count = 0) and in_fmt_pvlg_hier is not  null  and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null  then
    dbms_output.put_line('acc is null and rest are not null');
    *open v_refcursor for select usr_id,usr_type_cd* from vw_get_user_profile where usr_id in(SELECT  distinct up1.usr_id FROM vw_get_user_privileges up1,vw_get_user_privileges up2  WHERE 
              up1.usr_id=up2.usr_id and
              up1.product_hierarchy=in_report_pvlg_hier and up2.PRODUCT_HIERARCHY=in_fmt_pvlg_hier AND   up1.usr_id in (select usr_id from vw_get_user_for_customer where
              cust_id=in_cust_id)
              and up1.usr_id Member Of in_user_array);
    /* if account list is null and format pvlg hierarchy is null */
    elsif  (in_acct_array is null or in_acct_array IS EMPTY or in_acct_array.count = 0) and in_fmt_pvlg_hier is null and in_cust_id is not null and in_user_array.count>0 and in_report_pvlg_hier is not null
    then
    dbms_output.put_line('acc is null and format is null null');
    *open v_refcursor for select usr_id,tmzon_cd* from vw_get_user_profile where usr_id in (
      (SELECT  distinct usr_id FROM vw_get_user_privileges  WHERE  product_hierarchy=in_report_pvlg_hier  AND   usr_id in (select usr_id from vw_get_user_for_customer where
       cust_id=in_cust_id)
       and usr_id Member Of in_user_array))  ;
    /* if account list is not null and format pvlg hierarchy is  null */
    else  -- If i get only one privilege and all other inputs then 
    dbms_output.put_line('acc list is not null and format pvlg is null');
    *open v_refcursor for select usr_id,prod_shrt_nm* from vw_get_user_profile where usr_id in (
         SELECT USR_ID FROM VW_GET_ACCOUNTS WHERE USR_ID IN (SELECT  distinct usr_id FROM vw_get_user_privileges  WHERE 
         product_hierarchy=in_report_pvlg_hier  AND   usr_id in (select usr_id from vw_get_user_for_customer where
         cust_id=in_cust_id) and usr_id Member Of in_user_array ) AND acct_nb Member of in_acct_array);
    END IF;
    END proc_shared_report3;
    /Edited by: raj_fresher on Aug 12, 2009 8:50 AM
    Edited by: raj_fresher on Aug 12, 2009 1:40 PM

    its like this ...... ?
    You have to understand that without any testdata/ a reproducable testcase, all I can do is asking you to test some alternatives, I'm just guessing things from what I can make of your example, and hope you'll repost back any differences in a clear and concisive way.
    What I didn't understand is why you're not just joining your tables/views instead of using inner queries.
    Unfortunatly you're not providing any feedback on that, on the other hand you've narrowed down your problem to a specific part of your query? But you're not sharing why/what makes you decide to take that turn.
    But: you're still using inner queries in your reply.
    So, sorry, I cannot proceed/say anything useful unless you answer my previous post.
    Because, there are still many other questions/doubts: I don't understand why you're not aliasing your columns properly, for example.
    I don't know why you've suddenly switched to VW_GET_USER_cust_sa?
    I don't know if you've tried the straight join instead of nesting queries?
    And if you did, what's the problem?
    Please read and understand this, so you'll get your answers by the speed of light the next time you've got a question or problem:
    http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
    And don't refrain from using that tag ;)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Distinct clause and query performance

    Friends,
    I have a query which returns results in 40 seconds without distinct clause and when I add distinct clause it takes over 2 hours.
    I have verified following -
    1. indexes/table statistics are up to date.
    2. columns that are used in where clause but are not indexed have upto date column statistics
    Any idea what could be the reason, explain plan shows that distinct clause has a very expensive cost.
    Thanks
    Query and explain plan is below
    SELECT
    DISTINCT -- with distinct 2hrs + and without 40 seconds
    quote_by_dst.qte_hdr_stat_cd, quote_by_dst.qte_ln_cond_cd,
                    product.prod_nm, product.prod_id,
                    cs_ship_by_dst.bto_ds_cac_ownr_ud,
                    quote_by_dst.qte_csup_csup_am, cs_ship_by_dst.bto_ds_cac_nm,
                    product.spl_sht_nm,
                       product.prod_blg_un_fac_um
                    || ' '
                    || product.prod_blg_um
                    || ' '
                    || product.prod_stck_um,
                    product.prod_blg_um, quote_by_dst.qte_ln_brk_1_blg_uom_am,
                    quote_by_dst.qte_csup_avg_cst_am,
                    quote_by_dst.qte_csup_rev_gm_pct_am,
                    quote_by_dst.qte_csup_avg_cst_am, cs_ship_by_dst.bto_id,
                    cs_ship_by_dst.bto_ds_cac_cd,
                       cs_ship_by_dst.bto_ds_cac_cd
                    || product.prod_id
                    || cs_ship_by_dst.bto_id
               FROM infowhse.quote_by_dst4 quote_by_dst,
                    infowhse.product,
                    infowhse.cs_ship_by_dst4 cs_ship_by_dst,
                    infowhse.department
              WHERE (quote_by_dst.dpt_cd = department.dpt_cd)
                AND (quote_by_dst.cus_dpt_id = cs_ship_by_dst.cus_dpt_id)
                AND (product.prod_id = quote_by_dst.prod_id)
                AND (    (   quote_by_dst.qte_ln_cond_cd = 'E'
                          OR quote_by_dst.qte_ln_cond_cd = 'C'
                     AND quote_by_dst.qte_hdr_stat_cd = 'A'
                     AND ((cs_ship_by_dst.bto_cust_type_cd) = '01')
                     AND cs_ship_by_dst.bto_ds_cac_ownr_ud = 'EHOC'
                     AND department.dpt_cd > '0.00'
                    )Explain plan
    Plan
    SELECT STATEMENT  CHOOSECost: 911,832,256  Bytes: 433,941,639,459  Cardinality: 2,729,192,701                                               
         15 SORT UNIQUE  Cost: 911,832,256  Bytes: 433,941,639,459  Cardinality: 2,729,192,701                                          
              14 NESTED LOOPS  Cost: 68,705  Bytes: 433,941,639,459  Cardinality: 2,729,192,701                                     
                   12 HASH JOIN  Cost: 68,705  Bytes: 425,754,061,356  Cardinality: 2,729,192,701                                
                        1 INDEX FAST FULL SCAN NON-UNIQUE INFOWHSE.DST_SEC_DST_SEC_DST_CD_IX Cost: 25  Bytes: 922,700  Cardinality: 184,540                           
                        11 HASH JOIN  Cost: 16,179  Bytes: 1,199,209,082  Cardinality: 7,941,782                           
                             2 INDEX FAST FULL SCAN NON-UNIQUE INFOWHSE.DST_SEC_DST_SEC_DST_CD_IX Cost: 25  Bytes: 922,700  Cardinality: 184,540                      
                             10 HASH JOIN  Cost: 15,879  Bytes: 3,374,060  Cardinality: 23,110                      
                                  8 HASH JOIN  Cost: 15,200  Bytes: 2,981,190  Cardinality: 23,110                 
                                       6 HASH JOIN  Cost: 13,113  Bytes: 1,779,470  Cardinality: 23,110            
                                            3 TABLE ACCESS FULL INFOWHSE.CUSTOMER_SHIP Cost: 5,640  Bytes: 42,372  Cardinality: 1,177       
                                            5 PARTITION RANGE ALL  Partition #: 11  Partitions accessed #1 - #12     
                                                 4 TABLE ACCESS FULL INFOWHSE.QUOTE Cost: 7,328  Bytes: 38,826,590  Cardinality: 946,990  Partition #: 11  Partitions accessed #1 - #12
                                       7 TABLE ACCESS FULL INFOWHSE.PRODUCT Cost: 1,542  Bytes: 9,246,640  Cardinality: 177,820            
                                  9 INDEX FAST FULL SCAN NON-UNIQUE INFOWHSE.CUST_SHIP_SLSDST_DTP_SICALL_IX Cost: 185  Bytes: 9,878,411  Cardinality: 581,083                 
                   13 INDEX UNIQUE SCAN UNIQUE INFOWHSE.DEPARTMENT_PK Bytes: 3  Cardinality: 1                                

    This might be more useful.
    Query is still running.
    There is heavy wait time for scattered file read.
    Results from
    SELECT * FROM V$SESSION_WAIT WHERE SID = 48;
    SID   SEQ#  EVENT                           P1TEXT                          P1    P1RAW            P2TEXT                          P2    P2RAW            P3TEXT                          P3    P3RAW            WAIT_TIME                              SECONDS_IN_WAIT                        STATE              
    48    6865  db file scattered read          file#                           108   000000000000006C block#                          1593370000000000026E69 blocks                          32    0000000000000020 2                                      30                                      WAITED KNOWN TIME  
    SELECT * FROM V$SESSION_EVENT WHERE SID = 48;
    SID                                    EVENT                                                            TOTAL_WAITS                            TOTAL_TIMEOUTS                         TIME_WAITED                            AVERAGE_WAIT                           MAX_WAIT                               TIME_WAITED_MICRO                     
    48                                     log file sync                                                    1                                      0                                      0                                      0                                      0                                      563                                   
    48                                     db file sequential read                                          11                                     0                                      0                                      0                                      0                                      243                                   
    48                                     db file scattered read                                           6820                                   0                                      330                                    0                                      7                                      3296557                               
    48                                     SQL*Net message to client                                        19                                     0                                      0                                      0                                      0                                      23                                    
    48                                     SQL*Net message from client                                      18                                     0                                      128                                    7                                      127                                    1281912                                Sorry for long post.

  • Tunning the Query with Distinct Clause

    Hi All,
    I have the below query that returns 28113657 records
    select src_Wc_id, osp_id, src_osp_id
    from osp_complements o1
    where exists (select 1 from wc_crossref wc
                        where wc.src_wc_id = o1.SRC_WC_ID
                        and wc.state = 'CA')
    This query executes within a second...
    But when i include a DISTINCT clause in the select statement, it takes more time ... (more than 20 mins)
    I am trying to get it tunned. Please advice me with your knowledge to get it done
    Thanks for your time
    Kannan.

    Retrieving distinct rows requires a sort of all returned rows. 20 - 3 = ~17 mins for sorting 28 mln rows looks too much. You need to tune your instance in order to speed up sort operation. The amount of memory dedicated to sorts is controlled by PGA_AGGREGATE_TARGET parameter. If it's set to 0 (not recommended) then SORT_AREA_SIZE is used. The process of PGA tuning is quite complex and described in PGA Memory Management chapter of Performance Tuning Guide.
    There is a workaround which allows to bypass sort operation, but it requires proper index and proper access by that index. The idea is that rows rertrieved via index are automatically ordered by indexed columns. If that and only that columns (possibly - in the same order as in the index, I don't know) are selected using DISTINCT then sort is not actually performed. Rows are already sorted due to access via index.
    Hope this will help you.
    Regards,
    Dima

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

  • Query in jdeveloper using  distinct clause

    hello
    I am a user of oracle10G jdeveloper using jclient/swing
    in my product.
    I had written a query in my default view object as
    Select distinct(Name) from emp then i test it.
    Then message get displayed Query is valid.
    But when i bind this view object with my form ie with combobox using model property and finally run the form then it throw an error message .
    Please do help me to sort out this problem .
    thanks

    Please post the error message and the exception stack.
    My guess is that the error is: your VO's SQL statement did not include the primary key attribute (say Empno).
    Thanks.
    Sung

  • Distinct data from different columns of a table-Single query

    I have a table with different columns. Each of these columns have entries. A particular column, say, a column called name can have same entries more than one time. Likewise other columns can also have same entries more than once. My requirement is to have distinct entries from each of these columns using a single query, such that , for eg; the name column will contain the name George only once on retrieval. Place column will have the place Newyork only once...like that...but Newyork and newyork should be treated different(likewise in other columns also ie; case sensitive). I want to retrieve the above said using a single query from a table. Kindly help.
    Regards,
    Anees

    You're asking a SQL question in a JDBC forum. Look for a SQL forum. The website of the database manfactuer may have a SQL forum/mailinglist.

  • Removing or Suppressing 0DAT SAP Exit from BEx Query

    Hi,
    I have a BEx Query on a MultiProvider. The Multiprovider is based on two Cubes. Iam facing a problem with the 0DAT Characteristic Variable on 0CALDAY. Although I dont use the 0CALDAY in my query, this SAP Exit Variable pops-up when I run the query. How do I remove or atleast suppress it from popping-up?
    I tried the 'Save & Reuse Varibale Values' options from the Query Properties Dialog Box. Although this works but I want to use one more Customer Exit Characteristic Variable on 0CALDAY & this variable is also getting resued because of the setting I made for 0DAT. I want this variable to pop-up and the 0DAT variable to be removed completely(or atleast suppressed).
    Would also like to know why 0DAT Variable is popping-up even when I dont use 0CALDAY at all....
    Thanks in advance,
    -Ravi

    Hi,
    Please refer to your following mail..I have the same problem with 0dat. Could you provide me any solution for this..
    Thanks & Regards,
    Karthi
    > Hi,
    >
    > I have a BEx Query on a MultiProvider. The
    > Multiprovider is based on two Cubes. Iam facing a
    > problem with the 0DAT Characteristic Variable on
    > 0CALDAY. Although I dont use the 0CALDAY in my query,
    > this SAP Exit Variable pops-up when I run the query.
    > How do I remove or atleast suppress it from
    > popping-up?
    >
    > I tried the 'Save & Reuse Varibale Values' options
    > from the Query Properties Dialog Box. Although this
    > works but I want to use one more Customer Exit
    > Characteristic Variable on 0CALDAY & this variable is
    > also getting resued because of the setting I made for
    > 0DAT. I want this variable to pop-up and the 0DAT
    > variable to be removed completely(or atleast
    > suppressed).
    >
    > Would also like to know why 0DAT Variable is
    > popping-up even when I dont use 0CALDAY at all....
    >
    > Thanks in advance,
    > -Ravi

  • Distinct clause as part of EJB QL

    Hi,
    I am trying to perform a simple query which looks like following in ejb-jar.xml
    <query>
         <query-method>
         <method-name>findBySecurityNumber</method-name>
         <method-params>
         <method-param>int</method-param>
         </method-params>
         </query-method>
         <ejb-ql>SELECT DISTINCT OBJECT(a) FROM LoanEntity a WHERE a.securityId = ?1
    </ejb-ql>
    </query>
    In the SQL generated, I do not see the distinct clause being generated. Any ideas
    as to what I am doing incorrectly?
    This was a bug in SP 1, WL 6.1. But I am using SP2.
    Thanks for your help
    Mohit

    Hi Mohit,
    You aren't doing anything wrong. The generated queries don't contain a distinct clause
    because it isn't portable. For example, Oracle will not allow the use of "SELECT
    DISTINCT" in conjunction with a "FOR UPDATE" clause. For portablility, the EJB
    container manually weeds out the duplicate results. You can, however, still can have a
    distinct clause in your generated SQL by using the sql-select-distinct element of your
    CMP deployment descriptor. This may give you better performance but be sure the
    transaction your query executes in will not have an isolation level of
    TRANSACTION_READ_COMMITTED_FOR_UPDATE or you will run into problems.
    - Matt
    Mohit Sehgal wrote:
    Hi,
    I am trying to perform a simple query which looks like following in ejb-jar.xml
    <query>
    <query-method>
    <method-name>findBySecurityNumber</method-name>
    <method-params>
    <method-param>int</method-param>
    </method-params>
    </query-method>
    <ejb-ql>SELECT DISTINCT OBJECT(a) FROM LoanEntity a WHERE a.securityId = ?1
    </ejb-ql>
    </query>
    In the SQL generated, I do not see the distinct clause being generated. Any ideas
    as to what I am doing incorrectly?
    This was a bug in SP 1, WL 6.1. But I am using SP2.
    Thanks for your help
    Mohit

  • Distinct Clause missing on "Primary Key"

    In our implementation, we have views and tables mixed physical Schema. For the views, obviously, they do not have to have 1 column as PK, but have a combination of columns to uniquely identify a record. Now when we use some of the views as dimension in our physical layer to do a join, it will automatically mark that joined column in the view as a "key" column, which makes sense.
    Now, when we expose the very same column to the presentation, and then, do a query on that, it did not give use a distinct value of that column, instead, it give you 1 row per line. If I make a request by using columns with PK column from the same dimension table, it will not have a "Distnct" in the select statement , But if I put the PK column with other columns from a Fact table, it is then showing a "Distinct" clause in the select statement. In our situation, we need to have a distinct clause in the select statement, even there is no fact column involved.

    By definition your key column(s) defined in the Physical and Logical models must be unique. If you have multiple rows returned for your key when selecting from just the dimension table then your key is incorrect.
    If you are saying when you join to the fact you see multiple rows, then check you have set your aggregate functions correctly on your fact measures. ie. SUM/COUNT etc...
    Hope this helps.

Maybe you are looking for

  • Using a SOAP request to initiate an ESB flow

    I'm currently attempting to use the Oracle ESB as a pure routing engine for a project at work. Heres the basic way to works: 1. We get a SOAP request from a third party 2. We transform that request into a canonical format (via xslt) 3. Inside that ca

  • Client unable to connect AP with MAC filtering

    I need some help from you, I found problem that some clients cannot connect to AP( but some client can connect as normal). As I checked from logs, I see a lot of messages as below: Nov 18 01:13:55.760: %DOT11-4-MAXRETRIES: Packet to client 0023.68be.

  • Link Between risk category and Credit Grp

    Hai, My req is we maintained Automatic Credit control area for differnt risk catogeries .But it is blocking order in particular risk category which i maintain item check only. Rest of are not blocking.Can any one give reply to this message. Regards M

  • Live tile on Nokia Mix Radio

    Why did the old live tile get replaced by this pink monstrosity? The old album collage live tile was so much better and really helped show off WP's live tile feature. The new one is static (unless a song is playing, but that's not why I'm complaining

  • Troubleshooting Advice - EM 12.1.0.3 on Windows 2008r2

    A week ago, finally, I successfully got the 12c Grid Control up with all the associated targets added making me very happy since I had previously had 11g Grid Control but didn't have it at my new job until now. We have a scheduled monthly downtime fo