Cast(NULL as  INTEGER  ) - Problem

Hello,
Can any body explain me why there is a sub Query here. c3 is suppose to be Count(T263127."ROW_WID")
select distinct D1.c1 as c1,
D1.c2 as c2,
cast(NULL as INTEGER ) as c3
from
(select distinct T31796."NAME" as c1,
T325219."X_OPPTY_NAME" as c2
from
"W_OPTY_DX" T325219,
"W_ORG_D" T31796 left outer join "W_ORG_DX" T262715 On T31796."ROW_WID" = T262715."ROW_WID",
"W_REVN_F" T32385,
"W_OPTY_DX" T263127
where ( T31796."ROW_WID" = T32385."PR_ACCNT_WID" and T32385."OPTY_WID" = T263127."ROW_WID" and T32385."OPTY_WID" = T325219."ROW_WID" and T263127."X_ACTIVE_FLG" <> 'D' )
) D1
order by c1, c2
Thanks

Thanks guys......i just missed a Complex join :(

Similar Messages

  • RUNTIME EXCEPTION-Cannot cast null to boolean'.

    Hi Friends,
    I have the below mapping.The if condition is satisfied,even though 'then' value is going to the target field.
    When i try to check the queue of the 'IF' function it is throwing error RUNTIME EXCEPTION-Cannot cast null to boolean
                   >splitbyvalue(eachvalue)----> then
                  ->splitbyvalue(eachvalue)>if---->target field
                                     ->mapwithdefault->else
    Please help !!!
    Regards,
    Suresh.

    Hi,
    Thanks for the input!!
    In the below mapping suppose both 'equals' are satisfied then constant value '123' will go to target field otherwise 'else' value will go.
    constant(123)----
                              >concat>splitbyvalue(eachvalue)----
    > then
    E1K1456(source segment)-->\
    equals/
             >and--
    ---equals-\
                                                             concat>splitbyvalue(eachvalue)>if------>target field
    E1K1456(source segment)----
    >\
                                                              source field ->mapwithdefault->else
    Regards,
    Suresh.

  • Invalid casts - Object and Integer

    OK, I have got myself confused with casts. I have written this code, which I have [bold]SUBMITTED[bold] to University (so if you change it you are not helping me cheat...) . It doesn't compile and I am out of ideas why. The problem is the last method returnEvenNumbers(). Please could someone help me learn how this should be used by turning this into running code.
    * Filename: RandomNumberArray.java
    * Author: Steven Lane
    * Email: [email protected]
    * Created on 17 February 2002, 17:53
    * Course: KIT eLearning, MSc in IT, University of Liverpool, UK
    *         MSC-JV0020110-03
    * Purpose: This class creates an uncostrained array of length L passed as int on instantiation.
    *          The array is populated with (pseudo) random numbers.
    *          Methods contain a filter for even numbers, which is pushed onto a stack.
    * Version: 0.2
    //package com.thinkcorporation.week6;
    // ------------------- Import Packages -------------------
    import java.util.*;
    // ------------------- Class Heading -------------------
    public class RandomNumberArray extends java.lang.Object {
        // ------------------- Field Defintions -------------------
       private Stack stkEvenNumbers = new Stack();
        private int [] rndNoArray;
        //private int [] evenNoArray;
        private Integer evenNoArray[];
        // ------------------- Constructors -----------------------
        public RandomNumberArray(int length) {
            rndNoArray = new int [length];
            populateRndNoArray();
        //------------------- Methods -----------------------------
        private void populateRndNoArray() {
            Random rnd = new Random();
            for(int counter = 0; counter < rndNoArray.length; counter++) {
                rndNoArray[counter] = rnd.nextInt();
        public void evenNumberFilter() {
            for(int counter = 0; counter < rndNoArray.length; counter++) {
                if (rndNoArray[counter]%2 == 0)
                    stkEvenNumbers.push(new Integer(rndNoArray[counter]));
        public int [] returnEvenNumbers() {
            if (!stkEvenNumbers.empty()) {
                evenNoArray = new Integer [stkEvenNumbers.size()];
                evenNoArray = (Integer)stkEvenNumbers.toArray();
            return evenNoArray;
    }You help is much appreciated.

    The root of the problem is a difference between primitive types and objects. The Stack.toArray() method returns an array of Objects (Object[]), which you can cast to an array of Integer objects (Integer[]):
    evenNoArray = (Integer[])stkEvenNumbers.toArray();However, your return type for that method is int[] - a primitive types, not objects. Meaning that you either have to step through the array and build an array of ints (using Integer.intValue()), or you have to change the return type of your method.

  • Cast number to integer

    hopefully a simple question.
    How do I cast a number to integer?
    /Daniel

    From Number you can go a getInt to get the integer. And then you can initialize this integer using a try/catch block to get the Integer data type. The code would look something like this:
    Number n = <Number Value>.
    int i = n.getInt();
    try
    Integer intn = new Integer(i);
    catch(Exception e)
    }

  • Unsigned integer problem

    Hi,
    I have a problem of converting a CRand32 function from C to Java which was originally from IDA decompiler.
    There's one thing that's troubling me for quite a long time which is the lack of unsigned types, I could not do operations such as byte shifting correctly and the end result I get is sometimes a negative number or larger than 4billion.
    This CRand function should only generate 0 ~ 4billion.
    Can anyone enlighten me in this? As it's the first time I am doing such things.
    Here's the code I have from direct translation from C to Java :
        private transient long seed1, seed2, seed3; // In the code this is an unsigned int_32
        public final long CRand32__Random() {
         // assume the seed is already an unsigned long..
         seed1 = ((seed1 & 0xFFFFFFFE) << 12) ^
              (((seed1 << 13) ^ seed1) >> 19);
         seed2 = ((seed2 & 0xFFFFFFF8) << 4) ^
              (((seed2 << 2) ^ seed2) >> 25);
         seed3 = ((seed3 & 0xFFFFFFF0) << 17) ^
              (((seed3 << 3) ^ seed3) >> 11);
         return (seed1 ^ seed2 ^ seed3);
        }Thanks,
    Edited by: LightPepsi on May 30, 2010 11:40 PM
    Edited by: LightPepsi on May 30, 2010 11:40 PM

    LightPepsi wrote:
    That was the first thing which comes to my mind by changing >> to >>>, however the numbers generated are usually not within the range of an unsigned integer.
    It can be sometimes a negative number or larger than 4 billion and thus making the randomizer inaccurate.One possibility is to use ints for the internal shifts, but create a long as
    long unsignedValue = intValue & 0xFFFFFFFFL;for returning the number and possibly for any internal comparisons you need to make.
    Winston

  • Need help with modifying IDS Sensor in WLC; Null Probe Response problem.

    I need help in figuring out how to handle a NULL Probe Response report we are getting from our WCS.
    We are getting the following alert from our WCS:
    1. Message: IDS 'NULL probe resp 2' Signature attack cleared on AP 'XXXAP_#2' protocol '802.11b/g' on Controller '161.201.97.8'. The Signature description is 'NULL Probe Response - No SSID element'. - Controller Name: XXX-XXXX-XX
    And
    1. Message: IDS 'NULL probe resp 2' Signature attack detected on AP 'XXXAP#2' protocol '802.11b/g' on Controller '161.201.97.8'. The Signature description is 'NULL Probe Response - No SSID element', with precedence '3'. The attacker's mac address is 'ac:86:74:1e:15:5f', channel number is '5', and the number of detections is '1'. - Controller Name: XXX-XXXX-XX.
    Is this something to be concerned with in terms of a potential attack, or should I ignore these types of emails?
    According to a previous post here: https://supportforums.cisco.com/discussion/10731846/wireless-system-has-detected-possible-intrusion-attack-signature    I need to modify my IDS Signature folder in the WLC. I have no idea how to modify the file itself into the format needed to prevent these intrusions. Could somebody please help me correctly enter the right format needed for this file, or correct me in my thinking. I assume I'm in the right direction but if anyone has further information that could be helpful it would be greatly appreciated. Thanks in advance.

    The IDS signatures are stored in a file called wlc-sig_std.sig. That file can be edited via GUI by navigating to Security > Wireless Protection Policy > Standard Signatures. The links that you shared contain links to Cisco documentation that leave out the important parts of the documentation. The only way to get that documentation is to pull the existing signatures from the WLC using Commands > Upload File. Read that file for details on the syntax, then adjust your values in the GUI. I've attached a text document with the standard signature file.

  • Integer problem

    How can this code throw ClassCastException:
    'loginservlet
    int id = rs.getInt(1);
    session.setAttribute("user", new Integer(id));
    'jsppage after login
    String user;
    user = (String) session.getAttribute("user");It throws:
    Exeception: java.lang.Exception: java.lang.ClassCastException: java.lang.IntegerAndreas

    Session attribute user is set so the user only recive the posts from database that matches the users id. It�s a form of validation on requests.
    String sql = "SELECT * FROM [URLS] WHERE [IdUser] = " + userid +" ORDER BY [UrlName] ASC"; Here UserId should be the the session attribute user.
    Andreas

  • Problem in Aggregate with Multiple level of dimension

    Hi,
    I have a BI repository with a snowflake schema. I have also designed the business model with snowflake, It works with drilling and all but I am facing problem when I am
    creating  a logical column aggregating with a higher level of dimentation. Let me illustrate that :
      I have the Following Hierarchy :
    Tournament(id, Name) ---- > Round (id, name, tournament_id) -------> Match (id, Name, RoundId ) |  Match is fact table and other 2 dimension.
      I also created a logical dimension called tournament with 3 levels.
      Now say I want to create a logical column Total Number of Matches , aggregating  to the dimension level of Tournament. The result gives counts a 0 for every tournament. However
      it is working perfectly when the dimension level is Round (which is the immediate next level after fact).
      The Logical request generated (in case of Tournament level) :
       MatchId:[DAggr(Measure1.MATCHID by [ Matches$.TournamentId]  SB Tournament)] as c1 GB.   
        There is no such column as TournamentId in Matches$ table. How does the BI server got this ?
       The execution plan  evaluate this:
         cast(NULL as  INTEGER )  as c1 GB [for database 0:0,1]
       Can someone please explain why is this happening, is it because of the snowflake schema, but I guess if BI server can handle a snowflake schema it should work the Aggregate
       properly in multiple levels of dimensions, or it is something I am doing wrong.
       Execution Environment:
         Windows XP ,  OBI 10g on OC4J.  Data source : MS Excel (ODBC 3.5)
      Regards,
      Ru

    Hi,
    With reference to your question.
    Can any operator perform this task..I don't think any single operator will help you.
    I suggest using an intermediate (staging) table by using a PL SQL procedure with output port to store the values of account number provided the number of accounts are limited. Else use an array variable for account of an employee.
    In short no simple solution because of the bad source design else the pivot/unpivot operator would have helped you.
    Cheers
    - Mohammed

  • BIEE 10g combine month and day data in one report

    Hi
    I am trying to build a simple model to report employee absence per day against number of employees per month.
    There are two challenges:
    a) not setting content level of No_of_employees, drilling down along calendar to day level shows the Absence_day numbers, but not the number of employees for the month
    b) setting the content level of No_of_employees to month repeats the numbers correctly for each day in a month, but does not aggregate No_of_employees at a higher level (quarter or year)
    How do I achieve a report like this without loosing the ability to aggregate numbers at year level?
    Report sample
    Year     Month     Date     No_of_employees     Absence_day
    2012     June     06/01     15000               10
    2012     June     06/02     15000               8
    2012     June     06/03     15000               14
    2012     June     06/04     15000               5
    2012     June     06/05     15000               6
    OBIEE Version: 10.1.3.4.1 (not patched in a while)
    The calendar dimension has been build using OWB. Year, quarter and month level do contain negative dimension keys for values at these levels and f_employee joins to the negative values. The lowest level is day (positive dimension key values).
    Month June 2012; D_calender.dim_key = -50 (negative value !)
    Dates in June 01 - 30, D_calender.dim_key = 100 - 130 (positive values)
    Dimension: Calendar
    logcial levels: year - Quarter - Month - Detail (= date)
    logical key: Date
    LTS Fact 1: employees
    at month level
    physical join: f_employee.cal_fk = D_calender.dim_key
    measure: No_of_employees
    aggregation: sum
    logical:
    LTS content level: Calender dimension set to Month
    LTS Fact 2: absence
    at day level
    physical join: f_absence.cal_fk = D_calender.dim_key
    measure: Absence_day
    aggregation: sum
    logical:
    LTS content level: Calender dimension set to Detail (= date)
    Both facts are LTS for the same Logical Fact table.
    Thanks for your help
    Regards
    Andy

    The SQL I get when executing a request:
    If I could get Answers to display values of c9 instead of c5 (last few lines of the SQL), my problem may be solved
    WITH
    SAWITH0 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4
    from
    (select sum(nvl(T116806.FRAVAERSDAG , 0)) as c1,
    T116670.DATO as c2,
    T116670.AAR_NR as c3,
    T116670.MAANED_NAVN as c4,
    ROW_NUMBER() OVER (PARTITION BY T116670.DATO ORDER BY T116670.DATO ASC) as c5
    from
    DM2.D_KALENDER_HIER T116670 /* Aggregation_D_Kalender_Hier */ ,
    DM2.F_FRAVAERSPERIODE_DAG_V2 T116806 /* Aggregation_F_FRAVAERSPERIODE_DAG_V2 */
    where ( T116670.AAR_NR = 2012 and T116670.DIMENSION_KEY = T116806.D_KALENDER_FK and T116670.MAANED_NAVN = 'April' )
    group by T116670.AAR_NR, T116670.DATO, T116670.MAANED_NAVN
    ) D1
    where ( D1.c5 = 1 ) ),
    SAWITH1 AS (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3
    from
    (select sum(T116663.ANSAT) as c1,
    T116670.AAR_NR as c2,
    T116670.MAANED_NAVN as c3,
    ROW_NUMBER() OVER (PARTITION BY T116670.MAANED_NAVN ORDER BY T116670.MAANED_NAVN ASC) as c4
    from
    DM2.D_KALENDER_HIER T116670 /* Aggregation_D_Kalender_Hier */ ,
    DM2.F_ANSAT_I_MAANED_LOENUDB_V2 T116663 /* Aggregation_F_ANSAT_I_MAANED_LOENUDB_V2 */
    where ( T116663.KALENDER_DIM_HIER = T116670.DIMENSION_KEY and T116670.AAR_NR = 2012 and T116670.MAANED_NAVN = 'April' )
    group by T116670.AAR_NR, T116670.MAANED_NAVN
    ) D1
    where ( D1.c4 = 1 ) )
    select case when SAWITH1.c2 is not null then SAWITH1.c2 when SAWITH0.c3 is not null then SAWITH0.c3 end as c1,
    case when SAWITH0.c4 is not null then SAWITH0.c4 when SAWITH1.c3 is not null then SAWITH1.c3 end as c2,
    SAWITH0.c2 as c3,
    SAWITH0.c1 as c4,
    cast(NULL as INTEGER ) as c5,
    SAWITH0.c1 as c6,
    SAWITH1.c1 as c9
    from
    Sawith0 Full Outer Join Sawith1 On Nvl(Sawith0.C4 , 'q') = Nvl(Sawith1.C3 , 'q') And Nvl(Sawith0.C4 , 'z') = Nvl(Sawith1.C3 , 'z')
    order by c1, c2

  • User SYSTEM does not exist

    Hi there,
    Using the MDK:
    -I have set up my publication items
    -added them to my publication
    -used the packaging wizard to setup my application and attach it to the publication
    -used the Oracle Mobile administrator to create a user.
    -used the Oracle Mobile administrator to assign the user to the application.
    On Win32, I download the WIN32 Setup and run it with the user and password.
    It sets up the DMAgent, etc, and installs all of the oracle lite stuff into c:\mobileclient
    Next, I run MSYNC.EXE with the user's name. It completes successfully. What happens next is very strange:
    C:\Documents and Settings\allen>msql system/moogle@polite:tenchi_pman
    Oracle Lite MSQL Version 10.3.0.1.0
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    [POL-5246] user SYSTEM does not exist
    C:\Documents and Settings\allen>
    Has anyone encountered this?
    Thanks,
    Allen
    p.s. my environment details are as follows:
    Mobile Repository Configuration
    Operating System: Linux 2.6
    Oracle Database: 10.2.0.3.0
    Mobile Server Configuration (all the latest patches applied at this time)
    Mobile Server Install Type: Standalone
    Operating System: Microsoft Windows XP
    Mobile Server: 10.3.0.1.0
    Secure Socket Layer: No
    Part of Web Farm: No
    Java J2SE: 1.5.0_15
    Mobile Client Configuration
    Mobile Client Type: Windows 32
    Operating System: Microsoft Windows XP SP2
    Mobile Client: 10.3.0.1.0

    Is there a way for me to create the SYSTEM user in the Oracle Lite database, or is this error a symptom of a different problem?
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.CAT (TABLE_NAME, TABLE_TYPE) AS SELECT TABLE_NAME, TABLE_TYPE FROM SYSTEM."okClass" WHERE TABLE_TYPE IN ('TABLE', 'VIEW')
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_CONSTRAINTS (OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, SEARCH_CONDITION, R_OWNER, R_CONSTRAINT_NAME, DELETE_RULE, STATUS, VALIDATED) AS SELECT OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, SEARCH_CONDITION, R_OWNER, R_CONSTRAINT_NAME, DELETE_RULE, STATUS, VALIDATED FROM SYSTEM.POL__CONS
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_CONS_COLUMNS ( OWNER, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, POSITION) AS SELECT OWNER, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, POSITION FROM SYSTEM.POL__COLUSAGE
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.TABLE_PRIVILEGES ( OWNER, TABLE_NAME, GRANTOR, GRANTEE, GRANT_TYPE, GRANTABLE) AS SELECT OWNER, TABLE_NAME, GRANTOR, GRANTEE, GRANT_TYPE, GRANTABLE FROM SYSTEM.ALL_PRIVILEGES WHERE OBJECT_TYPE = 0
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.COLUMN_PRIVILEGES ( OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR, GRANTEE, GRANT_TYPE, GRANTABLE) AS SELECT OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR, GRANTEE, GRANT_TYPE, GRANTABLE FROM SYSTEM.ALL_PRIVILEGES WHERE OBJECT_TYPE = 5
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_VIEWS ( OWNER, VIEW_NAME, TEXT_LENGTH, TEXT) AS SELECT TABLE_SCH, TABLE_NAME, VIEW_LEN, VIEW_TEXT FROM SYSTEM."okClass" WHERE TABLE_TYPE IN ('VIEW')
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_TABLES ( OWNER, TABLE_NAME, TABLESPACE_NAME, CLUSTER_NAME, PCT_FREE, PCT_USED, INI_TRANS, MAX_TRANS, INITIAL_EXTENT, NEXT_EXTENT, MIN_EXTENTS, MAX_EXTENTS, PCT_INCREASE, BACKED_UP, NUM_ROWS, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, CHAIN_CNT, AVG_ROW_LEN) AS SELECT TABLE_SCH, TABLE_NAME, CAST('OOT' AS VARCHAR(128)), CAST(NULL AS VARCHAR(128)), CAST(0 AS INTEGER), CAST(0 AS INTEGER), CAST(0 AS INTEGER), CAST(0 AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS VARCHAR(1)), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER) FROM SYSTEM."okClass" WHERE TABLE_TYPE IN ('TABLE')
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_TAB_COLUMNS ( OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE, IS_HIDDEN) AS SELECT COLUMN_SCH, TABLE_NAME, COLUMN_NAME, CASE TYPE_CODE WHEN -16 THEN 'NCLOB' WHEN -15 THEN 'CLOB' WHEN -14 THEN 'BLOB' WHEN -13 THEN CAST('LONG' AS VARCHAR(30)) WHEN -12 THEN 'NUMBER' WHEN -11 THEN 'ROWID' WHEN -10 THEN 'LONG RAW' WHEN -9 THEN 'RAW' WHEN -8 THEN 'TINYINT' WHEN -7 THEN 'LONG VARBINARY' WHEN -6 THEN 'VARBINARY' WHEN -5 THEN 'BINARY' WHEN -4 THEN 'BIGINT' WHEN -3 THEN 'LONG VARCHAR' WHEN -2 THEN 'REF' WHEN -1 THEN 'UNKNOWN' WHEN 1 THEN 'CHAR' WHEN 2 THEN 'NUMERIC' WHEN 3 THEN 'DECIMAL' WHEN 4 THEN 'INTEGER' WHEN 5 THEN 'SMALLINT' WHEN 6 THEN 'FLOAT' WHEN 7 THEN 'REAL' WHEN 8 THEN 'DOUBLE' WHEN 9 THEN CASE SUBTYPE_CODE WHEN 1 THEN CAST('DATE' AS VARCHAR(9)) WHEN 2 THEN 'TIME' WHEN 4 THEN 'TIMESTAMP' ELSE 'EMPTY' END WHEN 10 THEN 'INTERVAL' WHEN 12 THEN 'VARCHAR' WHEN 13 THEN 'VARCHAR2' WHEN 14 THEN 'BIT' ELSE 'EMPTY' END, CASE WHEN TYPE_CODE <> 9 THEN COL_PRECISION WHEN TYPE_CODE = 9 AND SUBTYPE_CODE = 1 THEN 8 WHEN TYPE_CODE = 9 AND SUBTYPE_CODE = 2 THEN 6 WHEN TYPE_CODE = 9 AND SUBTYPE_CODE = 4 THEN 15 ELSE CAST(NULL AS INTEGER) END, CASE WHEN TYPE_CODE NOT IN (-16, -15, -14, -13, -11, -10, -9, -7, -6, -5, -3, 1, 9, 12, 13) THEN COL_PRECISION ELSE CAST(NULL AS INTEGER) END, CASE WHEN TYPE_CODE IN (-12, 2, 3, 4, 5, 10) THEN COL_SCALE ELSE CAST(NULL AS INTEGER) END, CASE NULLABILITY WHEN 0 THEN CAST('N' AS VARCHAR(1)) ELSE 'Y' END, POSITION, CASE DEFAULT_LENGTH WHEN 0 THEN CAST(NULL AS INTEGER) ELSE DEFAULT_LENGTH END, CASE DEFAULT_LENGTH WHEN 0 THEN CAST(NULL AS VARCHAR(4096)) ELSE DATA_DEFAULT END, CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CASE ISHIDDEN WHEN 0 THEN CAST('N' AS VARCHAR(1)) ELSE 'Y' END FROM SYSTEM."okAttr" WHERE TABLE_TYPE IN ('TABLE', 'VIEW')
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.USER_OBJECTS ( OWNER, OBJECT_NAME, OBJECT_ID, OBJECT_TYPE, CREATED, LAST_DDL_TIME, CREATED_TIME, STATUS) AS SELECT SCHEMA_NAME, OBJECT_NAME, OBJECT_ID, CASE OBJECT_TYPE WHEN 0 THEN CAST('TABLE' AS VARCHAR(128)) WHEN 1 THEN 'VIEW' WHEN 2 THEN 'INDEX' WHEN 3 THEN 'SEQUENCE' ELSE 'SYNONYM' END, CAST(CREATED AS DATE), CAST(CREATED AS DATE), CAST(CAST(CREATED AS TIMESTAMP(0)) AS VARCHAR(128)), CAST('VALID' AS VARCHAR(128)) FROM SYSTEM.POL__ALLOBJ WHERE OBJECT_NAME NOT LIKE 'POL_%' AND SCHEMA_NAME IN (SELECT NAME FROM POL__SCHEMATA WHERE OWNER = USER)
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_USERS ( USERNAME, USER_ID, CREATED) AS SELECT USERNAME, USER_ID, CREATED FROM SYSTEM.POL__USERS
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_OBJECTS ( OWNER, OBJECT_NAME, OBJECT_TYPE, CREATED, STATUS) AS SELECT SCHEMA_NAME, OBJECT_NAME, CASE OBJECT_TYPE WHEN 0 THEN CAST('TABLE' AS VARCHAR(128)) WHEN 1 THEN 'VIEW' WHEN 2 THEN 'INDEX' WHEN 3 THEN 'SEQUENCE' ELSE 'SYNONYM' END, CAST(CREATED AS DATE), CAST('VALID' AS VARCHAR(128)) FROM SYSTEM.POL__ALLOBJ
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ACCESSIBLE_COLUMNS ( OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, COLUMN_ID, DEFAULT_LENGTH, DATA_DEFAULT, NUM_DISTINCT, LOW_VALUE, HIGH_VALUE) AS SELECT COLUMN_SCH, TABLE_NAME, COLUMN_NAME, CASE TYPE_CODE WHEN -4 THEN CAST('BIGINT' AS VARCHAR(128)) WHEN -3 THEN 'LONGVARCHAR' WHEN -2 THEN 'REF' WHEN -1 THEN 'UNKNOWN' WHEN 1 THEN 'CHAR' WHEN 2 THEN 'NUMERIC' WHEN 3 THEN 'DECIMAL' WHEN 4 THEN 'INTEGER' WHEN 5 THEN 'SMALLINT' WHEN 6 THEN 'FLOAT' WHEN 7 THEN 'REAL' WHEN 8 THEN 'DOUBLE' WHEN 9 THEN 'DATETIME' WHEN 10 THEN 'INTERVAL' WHEN 11 THEN 'VARCHAR' ELSE 'EMPTY' END, CASE WHEN TYPE_CODE IN (-3, 1, 11) THEN COL_PRECISION ELSE CAST(NULL AS INTEGER) END, CASE WHEN TYPE_CODE NOT IN (-3, 1, 11) THEN COL_PRECISION ELSE CAST(NULL AS INTEGER) END, CASE WHEN TYPE_CODE IN (2, 3, 4, 5, 9, 10) THEN COL_SCALE ELSE CAST(NULL AS INTEGER) END, CASE NULLABILITY WHEN 0 THEN CAST('N' AS VARCHAR(1)) ELSE 'Y' END, POSITION, CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER), CAST(NULL AS INTEGER) FROM SYSTEM."okAttr" WHERE TABLE_TYPE IN ('TABLE', 'VIEW')
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_INDEXES ( OWNER, INDEX_NAME, TABLE_OWNER, TABLE_NAME, TABLE_TYPE, UNIQUENESS) AS SELECT SCHEMA_NAME, INDEX_NAME, TABLE_SCHEMA, TABLE_NAME, CAST('TABLE' AS VARCHAR(10)), IS_UNIQUE FROM SYSTEM.POL__INDICES
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_IND_COLUMNS ( INDEX_OWNER, INDEX_NAME, TABLE_OWNER, TABLE_NAME, COLUMN_NAME, COLUMN_POSITION) AS SELECT SCHEMA_NAME, INDEX_NAME, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, INDEX_POSITION FROM SYSTEM.POL__INDICESDT
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_COL_COMMENTS ( OWNER, TABLE_NAME, COLUMN_NAME, COMMENTS) AS SELECT COLUMN_SCH, TABLE_NAME, COLUMN_NAME, COLUMN_COMMENT FROM SYSTEM."okAttr" WHERE COLUMN_COMMENT IS NOT NULL
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_TAB_COMMENTS ( OWNER, TABLE_NAME, TABLE_TYPE, COMMENTS) AS SELECT TABLE_SCH, TABLE_NAME, TABLE_TYPE, TABLE_COMMENT FROM SYSTEM."okClass" WHERE TABLE_COMMENT IS NOT NULL
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_SYNONYMS ( OWNER, SYNONYM_NAME, TABLE_OWNER, TABLE_NAME, DB_LINK) AS SELECT OWNER, SYNONYM_NAME, TABLE_OWNER, TABLE_NAME, CAST('NULL' AS VARCHAR(128)) FROM SYSTEM.POL__SYNONYM
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.ALL_SEQUENCES ( SEQUENCE_OWNER, SEQUENCE_NAME, MIN_VALUE, MAX_VALUE, INCREMENT_BY) AS SELECT SCHEMA_NAME, SEQ_NAME, MIN_VALUE, MAX_VALUE, INC_BY FROM SYSTEM.POL__SEQ WHERE SEQ_NAME NOT LIKE 'POL_%'
    Tid=0f34, Statement Text:CREATE VIEW SYSTEM.DATABASE_PARAMETERS AS SELECT PARAMETER, VALUE FROM SYSTEM.POL__DATABASE_PARAMETERS
    Does anything look amiss with this oldb_trc.txt file?
    Allen

  • Joining multiple tables across multiple data sources in MYSQL throws error

    Hi all,
    I have to join tables across multiples MYSQL databases
    eg :
    Table T1,T2 from DB1
    Table T3 from DB2
    Columns from T3 are aggregated ( dimensional column ).
    Hence when i query using oracle answers ( say i have columns from T1,T2 and T3 ) , OBIEE tries to a query DB1 by having NULL for columns in T3
    It uses cast(NULL as INTEGER ) for columns from T3 . But MYSQL throws an error because "cast(NULL as INTEGER )" is not supported by MYSQL.
    I tried executing the query generated by OBIEE manually , if i try giving cast(NULL as SIGNED INTEGER ) , it works.
    pasting the query for reference
    select distinct D1.c2 as c1,
    D1.c1 as c2,
    cast(NULL as INTEGER ) as c3
    from
    (select distinct T87.title_id as c1,
    T59.asin as c2
    from
    print_book_catalog T59 left outer join
    title_authority T87 On T59.asin = T87.asin
    where ( T59.asin = '0345378911' )
    ) D1
    I am not able to find any config file to set this property ( and use signed integer instead of integer ) . Even DBFeatures.INI does not have relevant information.
    Can someobody please help me solve this problem.

    Stijn,
    Thank you for the article link. That was very helpful! It seems that I had a few things off as you do need the "This source should be combined with other sources at this level." checked. In my two table source columns for DATA_SOURCE I defined a literal ('086496' and '085597' for the other) in the Column Mapping tab. I pasted the following in the Fragmentation content, checking the "This source..." box on the Content tab:
    eSIS.SANDBOX4_SCHOOLS.DATA_SOURCE = '086496'
    And pasted the following into the WHERE clause, checking "Select distinct values" on the Content tab:
    sandbox4."".OBIEE.NWOCA_SCHOOLS.SCHOOL_CODE = VALUEOF(NQ_SESSION."SCHOOL") AND sandbox4."".OBIEE.NWOCA_SCHOOLS.DATA_SOURCE = VALUEOF(NQ_SESSION."GROUP")
    This took care of my user's security, utilizing the session variables in the WHERE clause. I am now able to generate reports that only one user can access from one data source and share that same report with another user who can only see data from the other data source.
    Many thanks!!!

  • Conformed / nonconfirmed dimensions and multiple facts

    Hi all,
    There have been plenty of posts on this issue, I've read a lot about it, but still can't get this working. We're looking at a basic marketing process where we can track the links that have been clicked in marketing emails that have been sent out. What I have is two fact tables, with one conformed dimension between them, and one of the facts having a non-conformed dimension:
    Fact 1 linked to Dim - Links
    Fact 2 linked to Dim - Links; Dim - Email Name;
    In Fact 1 i have defined a measure that counts the number of links clicked
    In Fact 2 i have defined a measure that counts the number of links
    So, I can take fields from Dim - Email Name, and Fact 2 and this will correctly show me the number of links in that email. I can add in the Link Name from Dim - Links to give me the detail of the links in the email. However, when I then add the # of links clicked from Fact 2, this is shown as zero. Removing the Email Name will cause the # of clicks to be displayed correctly for each link.
    I've read this post here:
    report based on 2 different Fact tables
    which seems to contain my exact problem, but the solution listed hasn't worked for me. I've created hierarchies, set the LTS of Fact 1 to be Detail for Dim - Links, and the LTS of Fact 2 to be Detail for Dim - Links and Dim - Email Name. This doesn't work. I've then set the LTS of Fact 1 to be Total for Dim - Email Name. this doesn't work. I've then set the LTS for the dimension tables to be detail in each case, and this doesn't work either. My business question is pretty simple - for each email, list the links and how many times that link was clicked.
    I've started from scratch, I'm only looking at these 4 logical tables, I've got to the stage where I'm restarting BI after every change but I still can't see the problem. Can anyone give me any guidance please?
    thanks
    Matt

    Hi Wildmight,
    apologies for not posting for a few days, I've been out of the country. I've just tried all these, with no joy. At the moment then, I have one single Fact table, with two logical sources, LINKS_FACT and CLICKS_FACT. I've set the LTS for LINKS_FACT to be Email Detail and Link Detail, and the LTS for CLICKS_FACT to be Link Detail and Email Total. The single Fact table now has two measure columns, one a count distinct on linkid and one a count on the clicksid.
    When I go into answers, I select an email title of May Newsletter, choose the link name, and then select the # of links and number of clicks. The log for this query is:
    -------------------- SQL Request:
    SET VARIABLE QUERY_SRC_CD='Report';SELECT "Dim - Emails".TITLE saw_0, "Dim Links"."Link Name" saw_1, "Fact - Links"."# of Links" saw_2, "Fact - Links"."# of Clicks" saw_3 FROM "CRM 2.0" WHERE "Dim - Emails".TITLE = 'May Newsletter' ORDER BY saw_0, saw_1
    +++Administrator:2a0000:2a0007:----2009/05/19 10:05:08
    -------------------- General Query Info:
    Repository: Star, Subject Area: CRM 2.0, Presentation: CRM 2.0
    +++Administrator:2a0000:2a0007:----2009/05/19 10:05:08
    -------------------- Logical Request (before navigation):
    RqList
    Dim - Emails.TITLE as c1 GB,
    Dim Links.Link Name as c2 GB,
    # of Links:[DAggr(Fact - Links.# of Links by [ Dim Links.Id, Dim - Emails.Id] SB Dim - Emails Detail,Dim Links Detail)] as c3 GB,
    # of Clicks:[DAggr(Fact - Links.# of Clicks by [ Dim Links.Link Name, Dim Links.Id, Dim - Emails.Id, Dim - Emails.TITLE] )] as c4 GB,
    Dim - Emails.Id as c5 GB,
    Dim Links.Id as c6 GB
    DetailFilter: Dim - Emails.TITLE = 'May Newsletter'
    OrderBy: c1 asc, c2 asc
    +++Administrator:2a0000:2a0007:----2009/05/19 10:05:08
    -------------------- Execution plan:
    RqList <<3688>> [for database 3023:15084:CRM,31]
    D1.c1 as c1 [for database 3023:15084,31],
    D1.c2 as c2 [for database 3023:15084,31],
    D1.c3 as c3 [for database 3023:15084,31],
    D1.c4 as c4 [for database 3023:15084,31]
    Child Nodes (RqJoinSpec): <<3705>> [for database 3023:15084:CRM,31]
    RqList <<3573>> [for database 3023:15084:CRM,31]
    D1.c2 as c1 GB [for database 3023:15084,31],
    D1.c3 as c2 GB [for database 3023:15084,31],
    D1.c1 as c3 GB [for database 3023:15084,31],
    cast(NULL as INTEGER ) as c4 GB [for database 3023:15084,31],
    D1.c4 as c5 GB [for database 3023:15084,31],
    D1.c5 as c6 GB [for database 3023:15084,31]
    Child Nodes (RqJoinSpec): <<3679>> [for database 3023:15084:CRM,31]
    RqList <<3738>> [for database 3023:15084:CRM,31]
    count(distinct CRM_LINKS_FACT.ID by [ CRM_LINKS.ID, CRM_EMAILS.ID] ) as c1 [for database 3023:15084,31],
    CRM_EMAILS.TITLE as c2 [for database 3023:15084,31],
    CRM_LINKS.NAME as c3 [for database 3023:15084,31],
    CRM_EMAILS.ID as c4 [for database 3023:15084,31],
    CRM_LINKS.ID as c5 [for database 3023:15084,31]
    Child Nodes (RqJoinSpec): <<3658>> [for database 3023:15084:CRM,31]
    CRM_LINKS T26115
    CRM_EMAILS T26105
    CRM_LINKS T26129
    DetailFilter: CRM_EMAILS.ID = CRM_LINKS_FACT.EMAILID and CRM_EMAILS.TITLE = 'May Newsletter' and CRM_LINKS.ID = CRM_LINKS_FACT.ID [for database 0:0]
    GroupBy: [ CRM_EMAILS.ID, CRM_EMAILS.TITLE, CRM_LINKS.ID, CRM_LINKS.NAME] [for database 3023:15084,31]
    ) as D1
    ) as D1
    OrderBy: c1 asc, c2 asc [for database 3023:15084,31]
    +++Administrator:2a0000:2a0007:----2009/05/19 10:05:08
    -------------------- Sending query to database named CRM (id: <<3688>>):
    select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4
    from
    (select distinct D1.c2 as c1,
    D1.c3 as c2,
    D1.c1 as c3,
    cast(NULL as INTEGER ) as c4,
    D1.c4 as c5,
    D1.c5 as c6
    from
    (select count(distinct T26129.ID) as c1,
    T26105.TITLE as c2,
    T26115.NAME as c3,
    T26105.ID as c4,
    T26115.ID as c5
    from
    CRM_LINKS T26115,
    CRM_EMAILS T26105,
    CRM_LINKS T26129 /* CRM_LINKS_FACT */
    where ( T26105.ID = T26129.EMAILID and T26105.TITLE = 'May Newsletter' and T26115.ID = T26129.ID )
    group by T26105.ID, T26105.TITLE, T26115.ID, T26115.NAME
    ) D1
    ) D1
    order by c1, c2

  • Error in report "8.2 ORacle Essbase- Source Blending Page"

    Hi,
    I got an error in the report in "8.2 ORacle Essbase- Source Blending Page" after i deployed sample core and aslo configured with hyperion Essbase cubes related to this dashboard page.
    The main issue i was struggling is i have 2 more working instances configure with same essbase cube, those are working fine and report is showing in other 2 instances, but the 3 rd instance is showing error.. I deployed sample app core perfectly and all reports are showing only this report is giving me error.
    Even i tried by copying the xmls from the working instances also but no luck..Can any one suggest wat will be went wrong at my side.. 2 more instance are working fine with those cubes.
    Please see the below error message i was getting for that report.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 34500, message: ORA-34500: FROM is a reserved keyword that cannot be used in this context. measure olap_rev_gross_revenue from OLAP_REV_GROSS_REVENUE dimension olap_cust_segment_id from OLAP_CUST_SEGMENT with attribute olap_cust_segment_level from hierarchy ( 'CUST_SEGMENT') inhierarchy dimension olap_employee_id from OLAP_EMPLOYEE with hierarchy ( 'ORG') inhierarchy dimension olap_office_id from OLAP_OFFICE with attribute olap_office_level from hierarchy ( 'COMPANY_HIER') inhierarchy dimension at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11, s_12, s_13, s_14, s_15, s_16, s_17, s_18, s_19, s_20, s_21, s_22, s_23 FROM ( SELECT 0 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, 'Total Products' s_3, CAST(NULL AS VARCHAR(1)) s_4, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, CAST(NULL AS DOUBLE) s_9, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_10, CAST(NULL AS DOUBLE) s_11, CAST(NULL AS DOUBLE) s_12, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_13, CAST(NULL AS DOUBLE) s_14, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_15, CAST(NULL AS DOUBLE) s_16, CAST(NULL AS DOUBLE) s_17, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_18, CAST(NULL AS INTEGER) s_19, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_20, CAST(NULL AS INTEGER) s_21, CAST(NULL AS INTEGER) s_22, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_23 FROM "D - Sample Federated" UNION ALL SELECT 1 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, 'Total Products' s_3, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand") s_4, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, CAST(NULL AS DOUBLE) s_9, CAST(NULL AS DOUBLE) s_10, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_11, CAST(NULL AS DOUBLE) s_12, CAST(NULL AS DOUBLE) s_13, CAST(NULL AS DOUBLE) s_14, CAST(NULL AS DOUBLE) s_15, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_16, CAST(NULL AS DOUBLE) s_17, CAST(NULL AS DOUBLE) s_18, CAST(NULL AS INTEGER) s_19, CAST(NULL AS INTEGER) s_20, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_21, CAST(NULL AS INTEGER) s_22, CAST(NULL AS INTEGER) s_23 FROM "D - Sample Federated" WHERE (IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") IN (1)) AND (("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2008')) OR ("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2009')) OR ("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2010'))) UNION ALL SELECT 2 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, CAST(NULL AS VARCHAR(1)) s_3, CAST(NULL AS VARCHAR(1)) s_4, CAST(NULL AS INTEGER) s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_9, CAST(NULL AS DOUBLE) s_10, CAST(NULL AS DOUBLE) s_11, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY ) s_12, CAST(NULL AS DOUBLE) s_13, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_14, CAST(NULL AS DOUBLE) s_15, CAST(NULL AS DOUBLE) s_16, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY ) s_17, CAST(NULL AS DOUBLE) s_18, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_19, CAST(NULL AS INTEGER) s_20, CAST(NULL AS INTEGER) s_21, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY ) s_22, CAST(NULL AS INTEGER) s_23 FROM "D - Sample Federated" ) djm
    Any help was greatly appreciable...Thanks in Advancne..
    Regards
    Rushi

    Hi,
    I got an error in the report in "8.2 ORacle Essbase- Source Blending Page" after i deployed sample core and aslo configured with hyperion Essbase cubes related to this dashboard page.
    The main issue i was struggling is i have 2 more working instances configure with same essbase cube, those are working fine and report is showing in other 2 instances, but the 3 rd instance is showing error.. I deployed sample app core perfectly and all reports are showing only this report is giving me error.
    Even i tried by copying the xmls from the working instances also but no luck..Can any one suggest wat will be went wrong at my side.. 2 more instance are working fine with those cubes.
    Please see the below error message i was getting for that report.
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 34500, message: ORA-34500: FROM is a reserved keyword that cannot be used in this context. measure olap_rev_gross_revenue from OLAP_REV_GROSS_REVENUE dimension olap_cust_segment_id from OLAP_CUST_SEGMENT with attribute olap_cust_segment_level from hierarchy ( 'CUST_SEGMENT') inhierarchy dimension olap_employee_id from OLAP_EMPLOYEE with hierarchy ( 'ORG') inhierarchy dimension olap_office_id from OLAP_OFFICE with attribute olap_office_level from hierarchy ( 'COMPANY_HIER') inhierarchy dimension at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, s_8, s_9, s_10, s_11, s_12, s_13, s_14, s_15, s_16, s_17, s_18, s_19, s_20, s_21, s_22, s_23 FROM ( SELECT 0 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, 'Total Products' s_3, CAST(NULL AS VARCHAR(1)) s_4, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, CAST(NULL AS DOUBLE) s_9, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_10, CAST(NULL AS DOUBLE) s_11, CAST(NULL AS DOUBLE) s_12, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_13, CAST(NULL AS DOUBLE) s_14, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_15, CAST(NULL AS DOUBLE) s_16, CAST(NULL AS DOUBLE) s_17, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_18, CAST(NULL AS INTEGER) s_19, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_20, CAST(NULL AS INTEGER) s_21, CAST(NULL AS INTEGER) s_22, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products")) s_23 FROM "D - Sample Federated" UNION ALL SELECT 1 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, 'Total Products' s_3, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand") s_4, IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, CAST(NULL AS DOUBLE) s_9, CAST(NULL AS DOUBLE) s_10, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_11, CAST(NULL AS DOUBLE) s_12, CAST(NULL AS DOUBLE) s_13, CAST(NULL AS DOUBLE) s_14, CAST(NULL AS DOUBLE) s_15, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_16, CAST(NULL AS DOUBLE) s_17, CAST(NULL AS DOUBLE) s_18, CAST(NULL AS INTEGER) s_19, CAST(NULL AS INTEGER) s_20, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year",IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products"),IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Brand")) s_21, CAST(NULL AS INTEGER) s_22, CAST(NULL AS INTEGER) s_23 FROM "D - Sample Federated" WHERE (IDOF("D - Sample Federated"."Products"."Products Hierarchy"."Total Products") IN (1)) AND (("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2008')) OR ("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2009')) OR ("D - Sample Federated"."Time"."T05 Per Name Year" IN ('2010'))) UNION ALL SELECT 2 s_0, "D - Sample Federated"."Products"."P4 Brand" s_1, "D - Sample Federated"."Time"."T05 Per Name Year" s_2, CAST(NULL AS VARCHAR(1)) s_3, CAST(NULL AS VARCHAR(1)) s_4, CAST(NULL AS INTEGER) s_5, "D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" s_6, "D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" s_7, "D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" s_8, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_9, CAST(NULL AS DOUBLE) s_10, CAST(NULL AS DOUBLE) s_11, REPORT_AGGREGATE("D - Sample Federated"."Measures"."20d - Unit Price (Orcl Cube/Orcl Db)" BY ) s_12, CAST(NULL AS DOUBLE) s_13, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_14, CAST(NULL AS DOUBLE) s_15, CAST(NULL AS DOUBLE) s_16, REPORT_SUM("D - Sample Federated"."Measures"."1d- Revenue (Orcl Db Cube Only)" BY ) s_17, CAST(NULL AS DOUBLE) s_18, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY "D - Sample Federated"."Time"."T05 Per Name Year") s_19, CAST(NULL AS INTEGER) s_20, CAST(NULL AS INTEGER) s_21, REPORT_SUM("D - Sample Federated"."Measures"."2a- Qty (Orcl Db Tables Only)" BY ) s_22, CAST(NULL AS INTEGER) s_23 FROM "D - Sample Federated" ) djm
    Any help was greatly appreciable...Thanks in Advancne..
    Regards
    Rushi

  • Connection between 2 fact tables

    Hello guys!
    Suppose the following situation (it's a simplified one, of course):
    1) I have a dimension table d_contract with a list of contracts (and some attributes of a contract like its term and type). The primary key is ID_CONTRACT
    2) I have a fact table f_payments which contains payments for all contracts. It contains fields: ID_CONTRACT, AMOUNT_PAYMENT, DATE_OF_PAYMENT, ID_SALESROOM (so a measure is AMOUNT_PAYMENT: its default aggregation rule is set to SUM). Each contract can have many payments in different salesrooms.
    3) I have a dimension table d_salesroom with a list of all salesrooms (and some attributes of a salesroom like its address) where payments can be installed. The primary key is ID_SALESROOM
    4) I have a fact table f_calls which contains all phone calls (in tech support) regarding contracts. It contains fields: ID_CONTRACT, DATE_OF_CALL, DURATION_OF_CALL (so a measure is DURATION_OF_CALL: its default aggregation rule is set to SUM). Many calls for each contract can be done.
    Those were physical tables, and logical tables are the same. Connections between tables (physical and logical) are quite obvious: f_payments is connected with d_salesroom and d_contract, f_calls is connected with d_contract only.
    Then I want to run the following request (in Answers):
    ID_SALESROOM | ID_CONTRACT | SUM(AMOUNT_PAYMENT) | SUM(DURATION_OF_CALL)
    That is: for all salesroom I want to see all contracts (which were paid in the salesroom) and for each contract I want to see sum of payments (in the salesroom) and duration of all calls for that contract (not regarding the salesroom). If a contract was paid in more than one salesroom then the duration of calls should be the same for all salesrooms - duration is connected only to a contract, not to a salesroom.
    If I write this request in answres, I get zero call duration for all contracts. And in request log I see an expression CAST(NULL as INTEGER) instead of SUM(DURATION_OF_CALL). I suspect this is because d_salesroom isn't in any way connected with f_calls (neither physically nor logically). But what to do if I want a query like the above one to run correctly?
    What can I do with the repository to perform queries like that?

    Hi AFSK,
    d_contract is common dimension b/w two facts so in f_cells LTS add d_contract and f_payments into single source
    then your query will generated in the following way
    select a.Id_salesroom,b.Id_contract,c.Sum(Amount_payment) ,d.Sum(Duration_of_call) from
    d_salesroom a,d_contract b,f_cells c,f_payments d
    where a.Id_SalesRoom=d.Id_SalesRoom and a. Id_Contract=d.Id_Contract and a.Id_Contract=c.Id_Contract
    group by a.Id_salesroom,b.Id_contract
    hope it helps you

  • Forcing to use index

    I have a query which is taking 2 minutes to respond. When I see the explain plan, it said for two tables it is doing the full table scan. So I tried forcing to use the index on the inner tables(xcm, detail) of the views(vw_xcm , vw_vw_detail). But it is still not using indexes when the query is running. Please let me know if I am forcing the indexes right.
    Here is my code
    SELECT x.customer_gci AS hdr_borrower_gci,
                    x.industry_group_name AS hdr_borrower_sector,
                    x.industry_subgroup_name AS hdr_borrower_industry,
                    CAST (NULL AS number) AS hdr_incremental_fvo_amt,
                    x.industry_subgroup_code AS hdr_industry_cd,
                    x.industry_subgroup_name AS hdr_industry,
                    CAST (NULL AS integer) AS hdr_cds_tenor,
                    x.industry_group_code AS hdr_req_borrower_sector_cd,
                    x.industry_subgroup_code AS hdr_req_borrower_industry_cd,
                    x.customer_gci AS dtl_borrower_gci,
                    x.customer_name AS dtl_company_name,
                    (SELECT NVL (MAX (market_cap), 0)
                     FROM data_v2 kmv
                     WHERE     kmv.asof_date = (SELECT MAX (actual_data_date)
                                                FROM fvo_process_dtl dtl
                                                WHERE dtl.process_name = 'KMV')
                           AND kmv.spineid = x.spineid
                           AND kmv.market_cap <> 0)
                       AS dtl_marketcap,
                    x.industry_subgroup_name AS dtl_industry,
                    x.dtl_region,
                    (SELECT SUM (NVL (notional, 0))
                     FROM vw_gcm
                     WHERE     datestamp = (SELECT MAX (datestamp)
                                            FROM vw_fvo_gcm_trade)
                           AND familygci = family_gci
                           AND rpt_product = 'LOAN'
                           AND rpt_risk_group = 'FVO')
                       AS dtl_current_fvo_amt,
                    NULL AS dtl_trader_liquidity_cd,
                    CAST (NULL AS number) AS dtl_manager_acceptable_amt,
                    NULL AS dtl_lastused_date,
                    NULL AS dtl_trader_comments,
                    NULL AS dtl_manager_comments,
                    CAST (NULL AS number) AS dtl_incremental_fvo_amt,
                    x.industry_subgroup_code AS dtl_industry_code,
                    x.spineid,
                    (SELECT SUBSTR (MAX(TO_CHAR (ratingdate, 'YYYYMMDD')
                                        || iss.issuerrating),
                                    9
                     FROM issuerrating iss
                     WHERE iss.ratingschemeid =
                              (SELECT rs.ratingschemeid
                               FROM ratingscheme rs
                               WHERE rs.ratingschemename = 'SNP')
                           AND iss.ratingtypeid = (SELECT rt.ratingtypeid
                                                   FROM ratingtype rt
                                                   WHERE rt.ratingtypecode = 'LT')
                           AND iss.ratingdate <= TRUNC (SYSDATE)
                           AND iss.issuerrating NOT IN
                                    ('NR',
                                     'WR',
                                     'SD',
                                     'NM',
                                     'NRpi',
                                     'Rpi',
                                     'R',
                                     'SDpi')
                           AND iss.spineid = x.spineid)
                       AS dtl_snp_rating,
                    (SELECT SUBSTR (MAX(TO_CHAR (ratingdate, 'YYYYMMDD')
                                        || iss.issuerrating),
                                    9
                     FROM rating iss
                     WHERE iss.ratingschemeid =
                              (SELECT rs.ratingschemeid
                               FROM rating rs
                               WHERE rs.ratingschemename = 'MOODYS')
                           AND iss.ratingtypeid = (SELECT rt.ratingtypeid
                                                   FROM ratingtype rt
                                                   WHERE rt.ratingtypecode = 'LT')
                           AND iss.ratingdate <= TRUNC (SYSDATE)
                           AND iss.issuerrating NOT IN ('NR', 'WR', 'SD')
                           AND iss.spineid = x.spineid)
                       AS dtl_moodys_rating,
                    risk_rating AS dtl_internal_rating
             FROM (SELECT /* + INDEX(xcm fvo_xcm_customer_ix3) INDEX(id fvo_ecris_d_industry_dtl_ix1)*/ xcm.customer_gci AS customer_gci,
                          xcm.customer_name AS customer_name,
                          TRIM (REPLACE (id.industry_group_name, '"', ' '))
                             AS industry_group_name,
                          id.industry_group_code,
                          TRIM (REPLACE (id.industry_subgroup_name, '"', ' '))
                             AS industry_subgroup_name,
                          id.industry_subgroup_code,
                          TRIM (REPLACE (id.industry_subgroup_name, '"', ' '))
                             AS dtl_industry,
                          (SELECT threealphacountrycode
                           FROM xcm_region_country_map r
                           WHERE     r.twoalphacountrycode = xcm.country_code
                                 AND r.regioncode != 'INTL'
                                 AND r.region IN ('North American', 'EMEA'))
                             AS dtl_region,
                          (SELECT spineid
                           FROM companymap cm
                           WHERE     cm.sourcereferenceid = 24
                                 AND cm.sourcereferencevalue = xcm.customer_gci
                                 AND cm.enddate IS NULL)
                             AS spineid,
                          xcm.family_gci AS family_gci,
                          xcm.risk_rating AS risk_rating
                   FROM vw_xcm xcm,
                        (SELECT naics_code,
                                industry_group_name,
                                industry_group_code,
                                industry_subgroup_name,
                                industry_subgroup_code
                         FROM vw_detail
                         WHERE industry_subgroup_code IS NOT NULL) id
                   WHERE     xcm.period = (SELECT MAX (period)
                                           FROM vw_xcm)
                         --                                  AND xcm.industry_detail_key =
                         --                                        id.industry_detail_key
                         AND xcm.naics_code = id.naics_code
                        AND TRIM (xcm.customer_gci) NOT LIKE 'S%') x
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Sometimes the cost-based optimizer will not take hints because it thinks it knows better. This is a matter of debate here on OTN, where some posters dogmatically assert that hints are instructions that must be followed. My experience is different. I have on rare occasions used perfectly good hints (usually INDEX) that the database simply refused to use.
    Someone noted on a post a month or two ago that there may be a glitch with the CBO where it loses indexes when considering execution plans. This was based on a 10053 trace, which will show the different access paths considered during query evaluation.
    Ultimately the CBO is deciding you query is more efficient not to use the indexes, even with your hint.
    Looking again at your query I'll note that it is very complicated with inline views and more inline views. The CBO has trouble running multiple views efficiently - inline views, views of views, views joined to views - because views have no valid statistics associated with them. The choices the CBO makes based on views use defaults that are all but certain to be incorrect.
    In particular, your index use for "id" makes no sense because it is an inline view. you could try using a global hint by pushing the hint inside the view, something like
    INDEX(id.table_in_view fvo_ecris_d_industry_dtl_ix1)Unfortunately, the table inside the inline view id itself appears to be a view compliating this effort.
    Try using the USE_NL hint instead of INDEX and see if that helps
    Good luck

Maybe you are looking for