Correct the query

Hi,
I am getting different output. could anybody please suggest me what is the difference between below two query and correct the 2nd query
SELECT
COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 45 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_45
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 105 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_105
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 195 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_195
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 380 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_380
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 745 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_745
FROM order B, addr A
WHERE B.INDIVIDUAL_ID = A.INDIVIDUAL_ID
AND B.INDIVIDUAL_ID IN (
SELECT C.INDIVIDUAL_ID
FROM order C
WHERE C.PROD_STAT_MKE_CD IN ('A', 'B')
AND C.LAST_PAYMENT_DT >= SYSDATE - 745)
AND A.COUNTRY_CD ='IN';
SELECT
COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 45 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_45
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 105 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_105
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 195 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_195
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 380 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_380
,COUNT(DISTINCT CASE WHEN B.LSDT >= SYSDATE - 745 AND A.COUNTRY_CD='IN' THEN B.INDIVIDUAL_ID END) AS US_745
FROM order B, addr A
WHERE B.INDIVIDUAL_ID = A.INDIVIDUAL_ID and A.COUNTRY_CD ='IN'
and (PROD_STAT_MKE_CD IN ('A', 'B') AND LAST_PAYMENT_DT >= SYSDATE - 745);

The two queries are asking quite different questions.
The first looks for all individuals who have a country code of IN and also have a row in the order table (possibly even a different one with prod_stat_mke_cd either A or B and a last_payment_dt sometime in the last 745 days.
The second, looks for a row where the country code is IN and prod_stat_mke_cd is either A or B and has a last_payment_dt sometime in the last 745 days.
So, given these three rows:
individual_id  country_code prod_stat_mke_cd last_payment_dt
12345          IN           C                01-Jan-2011
12345          IN           A                01-Jan-2011
12345          IN           B                01-Jan-2011your first query will return the all three, while your second query will only return the last two rows.
What exactly are you expecting?
John

Similar Messages

  • Help in correcting the query

    Hi,
    I have below query:
    select u.v_um_code,v_um_name,count(f.v_fc_code), count(s.n_sl_no), count(distinct s.n_agent_no)
    from subm_buss_um_master u,subm_buss_fc_master f,submitted_business_raw s
    where u.v_um_code=f.v_um_code and f.v_fc_code=s.n_agent_no
    and f.v_status='A' and u.v_status='A'
    and trunc(d_submitted) between '01-JUL-2004' AND '31-JUL-2004'
    group by u.v_um_code,v_um_name;
    the output should be such that first all the records should be fetched from subm_buss_um_master table (where u.v_status='A')--> then count(f.v_fc_code) then -->count(s.n_sl_no), count(distinct s.n_agent_no)
    the data/columns in these tables is large, I cannot paste here.
    Thanks in advance
    Tariq.

    Hi,
    If SET operator UNION helps then great!!!
    For example: As per my requirement, first all employees and sum of salary.....is the query.
    SELECT ename, sal FROM emp
    UNION
    SELECT 'Grand Total ', SUM(sal) FROM emp
    ORDER BY sal;
    Regards,
    Sailaja

  • Help with Correcting the Query

    Hi Gurus,
    Could someone let me know if this query is right? When i am building a report i am getting an error that
    Incorrectly defined logical table source (for fact table MTL_DESCR_ELEMENT_VALUES) does not contain mapping for [IBE_MSITES_B.ATTRIBUTE10]. (HY000)
    Incorrectly defined logical table source (for fact table MTL_SYSTEM_ITEMS_FVL) does not contain mapping for [MTL_DESCR_ELEMENT_VALUES.ELEMENT_VALUE].
    from inv.mtl_system_items_b mtlb,
    inv.mtl_descr_element_values mtld,
    apps.mtl_item_Caterogies_v cat,
    apps.mtl_system_items_fvl fvl,
    ibe.ibe_msites_b imb,
    ibe.ibe_dsp_section_items idsi,
    ibe.ibe_dsp_msite_sct_items idmsi
    where mtlb.inventory_item_id = mtld.inventory_item_id
    AND cat.inventory_item_id = mtlb.inventory_item_id
    AND mtlb.inventory_item_id = fvl.inventory_item_id
    AND mtlb.inventory_item_id = idsi.inventory_item_id
    AND idsi.section_item_id = idmsi.section_item_id
    AND imb.msite_id = idmsi.mini_site_id
    Regards

    Hi,
    792011 wrote:
    Hi Gurus,
    Could someone let me know if this query is right? When i am building a report i am getting an error that I'm not sure what you mean by "right". If you're getting an error, doesn't that mean that it's not right?
    Incorrectly defined logical table source (for fact table MTL_DESCR_ELEMENT_VALUES) does not contain mapping for [IBE_MSITES_B.ATTRIBUTE10]. (HY000)
    Incorrectly defined logical table source (for fact table MTL_SYSTEM_ITEMS_FVL) does not contain mapping for [MTL_DESCR_ELEMENT_VALUES.ELEMENT_VALUE].Are those the exact error messages you're getting? What version of Oracle, and what tool, are producing them?
    from inv.mtl_system_items_b mtlb,
    inv.mtl_descr_element_values mtld,
    apps.mtl_item_Caterogies_v cat,
    apps.mtl_system_items_fvl fvl,
    ibe.ibe_msites_b imb,
    ibe.ibe_dsp_section_items idsi,
    ibe.ibe_dsp_msite_sct_items idmsi
    where mtlb.inventory_item_id = mtld.inventory_item_id
    AND cat.inventory_item_id = mtlb.inventory_item_id
    AND mtlb.inventory_item_id = fvl.inventory_item_id
    AND mtlb.inventory_item_id = idsi.inventory_item_id
    AND idsi.section_item_id = idmsi.section_item_id
    AND imb.msite_id = idmsi.mini_site_idEvery query must have a SELECT clause.
    I don't see any other obvious errors in what you posted, though, without the CREATE TABLE statments, there's no way I could see much besides syntax errors. Reading unformatted code is very difficult, however, so I may have missed siomething. Never write, let alone post, unformatted code.
    See the following thread for how to pinpoint errors by taking baby steps:
    What is wrong with my SQL Keeps Errroring out I cannot see where!  HELP

  • SQL query to correct the corrupted data

    Hi All,
    I got strucked up with a query correcting the corrupted records.
    CREATE TABLE EX1
    EMPID INTEGER,
    DW_EFF_DT DATE,
    DW_EXPR_DT DATE
    INSERT INTO EX1 VALUES(1,'04-MAR-1998','13-MAR-1999');
    INSERT INTO EX1 VALUES(1,'14-MAR-1999','02-MAY-2000');
    INSERT INTO EX1 VALUES(1,'03-MAY-2000','01-MAY-2013');
    INSERT INTO EX1 VALUES(1,'02-MAY-2013','31-DEC-9999');
    I have empid with other attributes,we are maintaing history.There is some data which is corrupted and we need to correct it.
    DW_EFF_DT which is less than '01-FEB-2005' should be made by default '31-JAN-2005'
    Again the data should be corrected and my output should be like the below
    EMPNO     DW_EFF_DT     DW_EXPR_DT
    1     2005-01-27     2005-01-28
    1     2005-01-29     2005-01-30
    1     2005-01-31     2013-05-01
    1     2013-05-02     9999-12-31
    I used the lead and lag function,but it is applied sequentially.
    How I can get the dates subtratcing by 1 for each and every alternative row.
    I tried the below query and able to achive half of it.
    SELECT A.* ,COALESCE(LEAD(NEW_DW_EFF,1) OVER(ORDER BY NEW_DW_EFF) -1,TO_DATE('31-DEC-9999','DD-MON-YYYY')) AS NEW_DW_EXPR_DT
    FROM
    SELECT ID,
    DW_EFF_DT,
    DW_EXPR_DT,
    CASE WHEN DW_EFF_DT<TO_DATE('01-FEB-2005','DD-MON-YYYY') THEN TO_DATE('31-JAN-2005','DD-MON-YYYY') ELSE DW_EFF_DT END AS NEW_DW_EFF
    FROM EX1
    )A
    ID     DW_EFF_DT     DW_EXPR_DT     NEW_DW_EFF     NEW_DW_EXPR_DT
    1     04-MAR-98     13-MAR-99      31-JAN-05      30-JAN-05
    1     14-MAR-99     02-MAY-00      31-JAN-05      30-JAN-05
    1     03-MAY-00      01-MAY-13      31-JAN-05      01-MAY-13
    1     02-MAY-13      31-DEC-99      02-MAY-13      31-DEC-99
    Please help me in this regard.i am still trying it.
    Thanks in advance,
    KVB

    KVB wrote:
    EMPNO     DW_EFF_DT     DW_EXPR_DT
    1     2005-01-27     2005-01-28
    1     2005-01-29     2005-01-30
    1     2005-01-31     2013-05-01
    1     2013-05-02     9999-12-31
    Actually the last record is the active record.
    Th 3rd record effectiuve date is adjusted because the dateis less than 2005-02-01. So that we adjusted to 2005-01-31,
    The 2nd record expiry date will be adjusted to 3rd record effective date-1,
    Now the 2nd record effective will be adjusted to 2nd record expiry date-1 and so on..until the first record.
    Actually I could not explain much better in business point of view like why they do this.Technically we need to achive this through SQL.
    CheersOkay, that makes more sense, thanks :)
    Probably not the prettiest ... but should work (you may need to tweak it a bit)
    ME_TUBBZ? select
      2        empid
      3     ,  to_date('2005-02-01','yyyy-mm-dd')  - ( 2* rn) + 1 as new_eff_date
      4     ,  case
      5           when rn = 1
      6           then
      7              dw_expr_dt
      8           else
      9              to_date('2005-02-01','yyyy-mm-dd') - (2 * (rn - 1))
    10        end
    11              as new_exp_date
    12     ,  dw_eff_dt
    13     ,  dw_expr_dt
    14  from
    15  (
    16     select
    17           empid
    18        ,  dw_eff_dt
    19        ,  dw_expr_dt
    20        ,  row_number() over (partition by empid order by dw_eff_dt desc)             as rn
    21     from ex1
    22     where dw_eff_dt < to_date('2005-02-01','yyyy-mm-dd')
    23  )
    24  order by dw_eff_dt  asc
    25  /
                 EMPID NEW_EFF_DATE         NEW_EXP_DATE         DW_EFF_DT            DW_EXPR_DT
                     1 27-JAN-2005 00 00:00 28-JAN-2005 00 00:00 04-MAR-1998 00 00:00 13-MAR-1999 00 00:00
                     1 29-JAN-2005 00 00:00 30-JAN-2005 00 00:00 14-MAR-1999 00 00:00 02-MAY-2000 00 00:00
                     1 31-JAN-2005 00 00:00 01-MAY-2013 00 00:00 03-MAY-2000 00 00:00 01-MAY-2013 00 00:00
    3 rows selected.
    Elapsed: 00:00:00.01
    ME_TUBBZ? Cheers,

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Unable to debug/correct the CMOD code for a variable used in a query

    unable to debug/correct the CMOD code for a variable used in a query
    i am using the data in a DSO in a query and using a custom coding variable in that query , but this data not coming in that query ..
    can anyone suggest how to debug that cmod code for the variable?
    code is written in CMOD tocde for the variable.

    belowis the code that i have written for a custom coding for a variable
    *******Start***
    IF i_step = 2.
      CASE i_vnam.
        WHEN 'IC_COMPCD'.
         TYPES:       BEGIN OF gt_itab_DyAuthTable,
                           username  TYPE /bic/afiop_o1200-/BIC/IC_USER,
                           companycode TYPE /bic/afiop_o1200-COMP_CODE,
                      END OF gt_itab_DyAuthTable,
                      BEGIN OF gt_itab_Cocd_all,
                            companycode TYPE /BI0/MCOMP_CODE-COMP_CODE,
                      END OF gt_itab_Cocd_all.
          DATA: gi_itab_DyAuthTable TYPE STANDARD TABLE OF gt_itab_DyAuthTable,
                wa_itab_DyAuthTable TYPE gt_itab_DyAuthTable.
           DATA: gi_itab_Cocd_all TYPE STANDARD TABLE OF gt_itab_Cocd_all,
                wa_itab_Cocd_all TYPE gt_itab_Cocd_all.
          SELECT /BIC/IC_USER
                 COMP_CODE FROM /bic/afiop_o1200
            INTO CORRESPONDING FIELDS OF TABLE gi_itab_DyAuthTable
            WHERE /bic/ic_user = sy-uname.
          LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
            IF wa_itab_DyAuthTable-companycode EQ '*'
              OR
              wa_itab_DyAuthTable-companycode EQ ' '.
              SELECT COMP_CODE FROM /BI0/MCOMP_CODE
                  INTO CORRESPONDING FIELDS OF TABLE gi_itab_Cocd_all.
              LOOP AT gi_itab_Cocd_all INTO wa_itab_Cocd_all.
                l_s_range-low    = wa_itab_Cocd_all-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
          to exit the loop if any one value is */space/all for a user's compcode values
            EXIT.
            ENDIF.
          ENDLOOP.
           if control is here means, the comp codes values didnt have */space
              LOOP AT gi_itab_DyAuthTable INTO wa_itab_DyAuthTable.
                l_s_range-low    = wa_itab_DyAuthTable-companycode.
                l_s_range-sign   = 'I'.
                l_s_range-opt    = 'EQ'.
                APPEND l_s_range TO e_t_range.
              ENDLOOP.
      Endcase.
    Endif.

  • The query is correct but jdbc modify it !!

    my query is
    SELECT o.ID_pagamento, SUM (m.valore) FROM operazioni o, movimenti_magazzino m WHERE m.ID_operazioni = o.ID AND m.quantita < 0 GROUP BY o.ID_pagamento
    but jdbc automatically executes a second query:
    SELECT COUNT(*), O.ID_PAGAMENTO, SUM (M.VALORE) FROM OPERAZIONI O, MOVIMENTI_MAGAZZINO M WHERE M.ID_OPERAZIONI = O.ID AND M.QUANTITA < 0
    without the "GROUP BY" the query is wrong
    what can I do?
    (I use jdk 1.3)

    huh?
    So the only thing that you are doing is the first query. You are not creating the second one nor are you using a 3rd party library that creates it.
    Then it has nothing to do with your first query. And so it doesn't matter whether it is wrong or not.
    Now it could be that you are doing something in your java code that causes this. For example trying 'count' the number of rows returned by using 'last'. If so it suggests there is a bug in the driver.
    But that doesn't matter. Obviously doing its own query. So you are saving nothing by using the last() method. So you might as well do the query yourself and do it correctly.

  • : "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

     Hi   .
        I was creating the  pass the values t in temp tables  though s sis package vs2012 .
      First I was taken on executive SQL TASK.
     IN EXCUTIVE SQL TASK  . I was write the stored proce:
    Sp;
    reate  procedure  USP_GETEMP2333
    AS
    begin
    Select  eid,ename,dept,salary from emp
    end;
    create table #temp(eid int,ename varchar(20),dept varchar(20),salary int)
      insert into #temp
       exec USP_GETMP02333
       go.
     It was executive correctly.
     I was taken another sequence container. In the sequence container iam creating one   executive  sql
    In 2<sup>nd</sup> excutive sql task: sql statements is
    if object_id('emp_fact_sal') is not null
     drop table emp_fact_sal
    select eid,ename as emp_name,sal_bar=
    case when salary<=5000 then 'l'
    when salary >5000 and salary<=7000 then 'm'
    else
    'h'
    end
    into emp_fact_sal from #temp.
     and one falt flies  it was taken to designation .
     iam changing  all  connection properties:
     in oldeb connection:
    in excutive sal task properties .
    delay validation is true,
    and retain connection maner is also true,
    and package mode is 64 bit is false.
     But iwas excutive in 2<sup>nd</sup> excutive ql task .
    Iam getting this type of errors,
                    [Execute SQL Task] Error: Executing the query " if object_id('emp_fact_sal') is not null
     drop ta..." failed with the following error: "Invalid object name '#Temp'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
     Please help me

    Arthur suggestion works but you shouldnt even be doing this on a SQL Task.
    Use a data flow task. You'll have better control over the data that is being transfered and get better performance because no staging table will be used.
    Just because there are clouds in the sky it doesn't mean it isn't blue. But someone will come and argue that in addition to clouds, birds, airplanes, pollution, sunsets, daltonism and nuclear bombs, all adding different colours to the sky, this
    is an undocumented behavior and should not be relied upon.

  • Need to save the query under the correct role

    Hi Experts,
    I need to save the query under the specific role. So is there anyway to find the query location by role??
    Thanks
    Regards,
    Arpan

    Hi,
    RSZCOMPDIR --> RSRREPDIR -->AGR_HIER
    From RSZCOMPDIR get all the entries of queries.
    compid is query name, take compuID and pass to RSRREPDIR.
    get genuniid and pass to AGR_HIER's sap_guid.
    AGR_NAME in AGR_HIER is role name.
    please check this.
    -Sriram
    Message was edited by: Sriramvijay R
    Message was edited by: Sriramvijay R

  • Data Error in the Query/Report after selective data deletion for infocube

    Hi Experts,
    Please advise what i was missing and what went wrong...
    I got a Query (Forecast) on a Multicube...which is based on 2 Infocubes with Aggregates...
    As i identified some data discrepency..yesteraday i performed selective data deleation on one of the Infocube
    and executed report yesteraday and the results in the query are correct...
    When today i executed the same report i am getting different results..
    When i compared the results of the report with that of data in cube they are not matching
    The report is not displaying the data in cube..for some rows it is displaying the data in the cube but for some rows it is just displaying same as the above row
    there is no data loaded into info cube after selective deleation
    Do i need to perform request compression and fill the aggregated after selective deleation
    Please advise what went wrong

    Hi Venkat,
    No i haven't done anything on aggregates before or after selective delete
    As there is not data load after the selective delete according to SAP Manual we don't need to perform any thing on aggregates...as selective data deletion on cube will delete data from aggregates as well
    Please update how to identify error

  • Text Variables are not being Displayed in the Output of the Query

    Hi All ,
    We have some column headings , which are populated through the Text Vaiables , But in the Query Ouptput only the tech names of the Text variables are being displayed . can anyone tell me why its happening like this . I want to debug the Query , please guide me in this regard
    Thanks in Advance.. Pls reply me as soon as possible

    Hi Nagarjuna reddy,
    Click on the properties of the infoobject enter the name of the description and next to that you can see the X/? buttion click on the this button and select the field/if the proper field is not there then create a field descriton and select. i hope this is works and correct me if i am wrong. for debuggin the query use a transaction code- RSRT.
    regs,
    Vachan

  • Cube loaded with data, but unavailable in the query

    Hello everyone,
    Someone can help me?
    I created a new Cube CO-PA for the year 2010, and loaded with data this year. To make sure that the data were correct did a ListCube, with all the filter equal to the query, and indeed the data is loaded properly for this year. And when i run the query with data from the years 2008 and 2009 show me  data in my report, but when I run the query for 2010, the query displays an error message saying that "no data".
    How is it possible to have the correct data in the Cube, and i can not view the data in the query?
    Note: The request in the cube is available to report
    Thank you all,
    Greetings,
    Maria João
    30-Março 2010

    Hello,
    I was in trouble because I had not selected the key figures in the multicube : S
    After selecting the key figures, I ran the query and it had data.
    Thank you for your help.
    Sincerely,
    Maria Joã

  • Problem with formula in the query

    HI ,
    In cube I have 2 fileds EU date and US date .
    For example :
    In cube EU date  =07/02/2008
               US date = 23/02/2008
    In the query we have a formula with these 2 fields
    formula is DUE date =  DATE ( ( 'Enter 1 = US; 2 = EU - Asia' == 1 ) * 'Due date US' + ( 'Enter 1 = US; 2 = EU - Asia' == 2 ) * 'Due date EU' )
    In the varaible screeen we have a '"Enter 1 = US; 2 = EU - Asia' == 1"
    So if u enter 1 it takes EU date and display as due date if u enter 2 it take US date and display as due date.
    Problem is :
    When we give  "'Enter 1 = US; 2 = EU - Asia' == 1"---this value 2
    in the report in some cases we get due date as 02/07/2008 instead of 07/02/2008. This is not for all records only few we get like this . and for US  due date this problem  is not there.
    Please suggest what might be the problem.

    Hi,
    Please check again the cell value because it may contain correct value but display may be different.
    You can apply the common display property fot the whole column using the workbook properties and saving the workbook.
    Regards,
    Anil

  • BI: some dimensions in multiprovider not showing in the query

    Dear all,
    i have created  cube top of DSO and i created  multiprovider with that cube and with 2 master info object
    but  when i create query it showing only few dimensions in the multiprovider so kindly help me on this
    for example multiprovider has 11 custom dimensions and 3 standard dimensions..!
    Thanks
    sivakumar Ramakrishnan.

    Can you elaborate, how many and which of the dimensions are not shown?(And please specify if they have some special properties like line item,high cardinality etc).Also check whether you have the same problem with the key figures in the multiprovider.
    Also, I know that it sounds silly but check the dataprovider of the query is whether the correct multiprovider.Check that there is characteristic in the dimension which does not appear.Then exit query designer, activate the multiprovider and go to query again.

  • Warning: An error occurred during tax calculation. Please correct the problem or contact your system administrator.

    Hi All
    We are creating POs from interface program "Import Standard Purchase Order Program". Only for few of the POs, we are encountering the error 'Warning: An error occurred during tax calculation
    . Please correct the problem or contact your system administrator.'
    This error is happening for few PO's, other POs with same vendor, ship to and bill to location created successfully by the program
    Any inputs on how to resolve this error is greatly appreciated.
    Regards,
    Brajesh

    Hi Hussein,
    Thank for the prompt response.
    We have already applied the patch related to doc 1272684.1.
    Below are the environment detail.
    Database: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Application : 12.1.3
    Diagnostic tool output :-
    INTERFACE_
    TRANSACTION_ID
    INTERFACE_TYPE
    COLUMN_NAME
    PROCESSING_DATE
    TABLE_NAME
    ERROR_MESSAGE_NAME
    ERROR_MESSAGE
    100148
    PO_DOCS_OPEN_INTERFACE
    09-Aug-2013
    PO_HEADERS_INTERFACE
    PO_PDOI_TAX_CALCULATION_ERR
    Warning: An error occurred during tax calculation. Please correct the problem or contact your system administrator.
    Log file :-
    +---------------------------------------------------------------------------+
    Purchasing: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    POXPOPDOI module: Import Standard Purchase Orders
    +---------------------------------------------------------------------------+
    Current system time is 09-AUG-2013 21:09:04
    +---------------------------------------------------------------------------+
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    STANDARD
    N
    INCOMPLETE
    12805
    +---------------------------------------------------------------------------+
    Start of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    To get the log messages for PDOI, please use the following id to query against FND_LOG_MESSAGES table:
    AUDSID = 12076063
    +---------------------------------------------------------------------------+
    End of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    +---------------------------------------------------------------------------+
    Executing request completion options...
    Output file size:
    69
    +------------- 1) PRINT   -------------+
    Printing output file.
                   Request ID : 55116524
             Number of copies : 0
                      Printer : noprint
    +--------------------------------------+
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed successfully
    Current system time is 09-AUG-2013 22:27:42
    +---------------------------------------------------------------------------+
    Brajesh

Maybe you are looking for

  • Indesign CS5.5 Not Splitting at Chapters on ePub Export

    I have a single document book in InDesign CS5.5. (Version 7.5.2) The file is DFSS55ePub.indd. It is just a single .indd file, not a .indb Every time on export to ePub, it is not respecting the Break Document at Paragraph Style: Chapter Title. I get a

  • Documents in Third Party Processing.

    Hi        What are all the documents that get created in Third Party Sales Processing? I am confused as to whether we create a delivery for the purchase order following sales order or we do just goods receipt followed by invoice receipt. Don't we cre

  • AOL mail bounce back

    I am getting bounce backs from any mail sent to an AOL account. The mail will go through if I log onto my mailbox at my ISP provider (Optimum Online). The bounce back has this message: Reason: SMTP transmission failure has occurred Diagnostic code: s

  • Query creating XML returns empty tags when no data

    Hello everyone, I have a problem that I just can't seem to solve. I have the following query: select             xmlelement                "users",                xmlagg                   xmlelement                      "user",                      x

  • Wired network and axp

    I have a linksys router and 2 axp configured to use as airtunes clients only. When I connect to the network wirelessly, I can access the axp's fine (well except for the intermittent dropout problem -- but that's another story). When I plug my laptop