Discoverer Plus - Lag / Over / Partition By / Order By (Conditional Syntax)

Good morning everybody
I have created the following syntax in Oracle Discoverer Plus and it works amazingly. However, I have a single problem.
This syntax gives me the comparison of two values (for instance: Jan.2010 values & Feb.2010 values). But it does not give me the value of all of the new records (for instance: if there is no values in Jan.2010, then it will not give me the value of Feb.2010). Hence, my report excludes all of the new records values.
If I am not mistaken, the below formulla will not be changed, but it needs some conditional syntax:
1. Compare syntax: if there is two similar records; and
2. Give the values of all the new records without any change in thier values
*(Amount-LAG(Amount,1)OVER(PARTITION BY "Sequence Number"ORDER BY "Sequence Number ASC))*
Thank very much in advance.
Mr. Zuhair Fardan
Kingdom of Bahrain
Email: [email protected]

Zuhair,
change,
(Amount-LAG(Amount,1)OVER(PARTITION BY "Sequence Number"ORDER BY "Sequence Number ASC)){code}
to
{code}
(Amount-LAG(Amount,1,0)OVER(PARTITION BY "Sequence Number" ORDER BY "Sequence Number ASC))Note the extra zero in LAG(Amount,1,0). That's the default return value if nothing is found.
As it is you are subtracting null from the amount and getting null.
Hope that is helpful.
- James

Similar Messages

  • Row Number() over partition by Order by in OBIEE Physical SQL

    Hi ,
    I created a OBIEE report in Dev using Answers. When I move the same report to Live, the count of rows was more in Live environment when compared to Dev.
    The objects count is same in both Dev and Production.
    WheniI verified the log file, I found that the Physical SQL in test has
    ROW_NUMBER ()
    OVER
    PARTITION BY c1, c4, c5 order by c1,c4,c5) whereas the physical SQL in Production has
    ROW_NUMBER ()
    OVER
    PARTITION BY c1, c4, c5, c8,c9 order by c1,c4,c5,c8,c9)
    How this Partiton is done in OBIEE. I have just copied the report from catalog and moved to production.There is no changes in report.
    Whether there are any settings to control it? HOw OBIEE does this Row Number() Partiton ? How can get this similiar to Test?
    Please help!
    Thanks
    Johnny

    Hi Saichand,
    The links were helpful. But i am not getting how it is working in test and not in live.
    I found one difference while deploying . The column names of the object both in Test and Production had spaces.For E.g: Full Name
    When this column Full Name is pulled to the repsository in test , it automatically put double quotes for the column names in the physical sql when it hits the database.
    But, In production , when I pulled the column the report gave error as Invalid Identifier since OBIEE generated column name as Full Name without double quotes.
    Then I changed the column in Phyiscal Layer repository by having double Quotes for all columns. Afte that report worked fine.
    Whether this has caused any issue in Row Partition.
    Is there any setting to have column name in Double Quotes ?
    Thanks,
    Johnny

  • Discoverer Plus/Viewer from menu item in Oracle Applications errors.

    Starting Discoverer Plus/Viewer from menu item in Oracle Applications R12 errors.
    Here is some general config information that is suspected to be the issue.
    1. Running Oracle Applications R12 over HTTPS.
    2. Running Discoverer Plus/Viewer over HTTP.
    3. Calling menu item that calls a function to start Plus/Viewer.
    Function Definition called by the menu item is listed blow.
    Properties Tab: Type=SSWA jsp function Context Dependence=Responsibility
    Form Tab: Parameters="mode=DISCO"
    Web HTML Tab: HTML Call=OracleOasis.jsp
    Fact: Starting Discoverer Plus using a URL works fine in the browser. The login page comes up and I can look in to Plus.
    The page that dose a redirection to start the Plus applet or Viewer web page fails with this error in IE 7.
    Internet Explorer cannot display the webpage
    Most likely causes:
    You are not connected to the Internet.
    The website is encountering problems.
    There might be a typing error in the address.
    Thank you for your time.

    Hi,
    Check that the ICX system profiles are set correctly for your Discoverer configuration. In particular the ICX: Discoverer Launcher and ICX: Discoverer Viewer Launcher system profiles.
    When IE displays an error is the URL displayed in the browser a correct Disco URL?
    Rod West

  • Count Distinct Over Partition Syntax Error

    Count(Distinct [field]) over (partition by [field2]) returns a syntax error at the key word distinct
    Count(all [field]) over (partition by [field2]) compiles fine
    I am writing a query to count the number of clients a sales rep has when the sales rep represents multiple companies (ad agency).  I need a count of the clients each company has and a distinct count that each rep has.  A client may be assigned to multiple companies.
    Is a distinct count supported with partitions?

    Until we wait for the full implementation of the OVER clause, you can
    try something like this:
    CREATE TABLE Foo (
    fookey INT PRIMARY KEY,
    company VARCHAR(30),
    sales_rep VARCHAR(30),
    client VARCHAR(30));
    INSERT INTO Foo VALUES(1, 'ABC Corp.', 'Joe', 'Client1');
    INSERT INTO Foo VALUES(2, 'ABC Corp.', 'Joe', 'Client2');
    INSERT INTO Foo VALUES(3, 'ABC Corp.', 'Peter', 'Client2');
    INSERT INTO Foo VALUES(4, 'DEF Corp.', 'Joe', 'Client1');
    INSERT INTO Foo VALUES(5, 'DEF Corp.', 'Joe', 'Client3');
    SELECT fookey, company, sales_rep, client,
    MAX(rk1) OVER(PARTITION BY sales_rep) AS rep_distinct_client_cnt,
    MAX(rk2) OVER(PARTITION BY company) AS company_distinct_client_cnt
    FROM (
    SELECT fookey, company, sales_rep, client,
    DENSE_RANK() OVER(PARTITION BY sales_rep ORDER BY client) As rk1,
    DENSE_RANK() OVER(PARTITION BY company ORDER BY client) As rk2
    FROM Foo) AS F;
    fookey company sales_rep client rep_distinct_client_cnt
    company_distinct_client_cnt
    1 ABC Corp. Joe Client1 3 2
    2 ABC Corp. Joe Client2 3 2
    3 ABC Corp. Peter Client2 1 2
    4 DEF Corp. Joe Client1 3 2
    5 DEF Corp. Joe Client3 3 2
    Plamen Ratchev
    http://www.SQLStudio.com

  • RMI protocol over JRMP transport error when accessing Discoverer Plus

    Hi,
    I just upgraded my Discoverer to 9.0.2.54.01. I can successfully access my Discoverer Viewer Workbooks but not my Discoverer Plus. When I try to access Plus, Applet will be started, and then it will prompt the RMI protocol error:
    Attempt 1.  RMI protocol over JRMP transport: Connection refused to host: 127.0.0.1; nested exception is:*
    java.net.ConnectException: Connection refused: connect*
    Attempt 2.  RMI protocol over http transport : Unable to attach to existing session.*
    I used browsers Mozilla3.0.5 and IE7.
    Thanks!

    Hi Andy
    It could be a Java incompatibility issue. On one of your client machines try removing Java altogether and then reconnecting to Discoverer Plus. The server should send down a new, clean version of the Java.
    Try this and let me know how you get on
    Best wishes
    Michael

  • Qualify row_number over(Partition by col order by col) and char2hexint() functions in informatica

    How to implement qualify row_number over(Partition by col order by col) and char2hexint in informatica in a way that is supported by pdo?
    Apart from sql overriding or using stored procedure ,is there any other solution?Can rank transformation help here? ....But, I guess rank transformation cannot be pushed down..
    help please !

    Hi Saichand,
    The links were helpful. But i am not getting how it is working in test and not in live.
    I found one difference while deploying . The column names of the object both in Test and Production had spaces.For E.g: Full Name
    When this column Full Name is pulled to the repsository in test , it automatically put double quotes for the column names in the physical sql when it hits the database.
    But, In production , when I pulled the column the report gave error as Invalid Identifier since OBIEE generated column name as Full Name without double quotes.
    Then I changed the column in Phyiscal Layer repository by having double Quotes for all columns. Afte that report worked fine.
    Whether this has caused any issue in Row Partition.
    Is there any setting to have column name in Double Quotes ?
    Thanks,
    Johnny

  • RunningTotal  in Discoverer Plus - Urgent Need

    Hi there,
    First of all wold like to say thanks for all.
    I would need help on RunningTotal in Discovere Plus, for example
    A
    1
    2
    3
    4
    Calculated_Running_Total_Amt
    1
    3 (1+2)
    6 (3+3)
    10 (6+4)
    I was wondering, I tried using RunningTotal function in Disco Plus while we calculate, but am not sure how it works, like it is asking order by row and someother stuff,.
    can anyone guide me onthis exactly how it works or is there any other way to accomoplish it that would be great.
    Thanks in advance,
    skat

    Hi,
    You need to use analytic functions to calculate running totals. So, for example, the calculation SUM(A) OVER (PARTITION BY B ORDER BY C) will first group the rows in partitions using column B then sort the rows using column C, then calculate a running total by taking the sum column A from the start of the partition to the current row. The rows may then appear in any order in the report, unless you use a sort in the workbook definition.
    Rod West

  • Lag with partition by.

    Hi,
    I have a question on LAG analytical function. Here is my test scenario.
    SCOTT@CRP1 > CREATE TABLE test1 AS 
    SELECT 123 document_id, 0 bill_id, 12.40 prev_balance
      FROM DUAL
    UNION ALL
    SELECT 123, 1, 13.2
      FROM DUAL
    UNION ALL
    SELECT 123, 2, 1.2
      FROM DUAL
    UNION ALL
    SELECT 122, 1, 15.5
      FROM DUAL
    Table created.
    Elapsed: 00:00:00.09
    SCOTT@CRP1 > select * from test1;
    DOCUMENT_ID    BILL_ID PREV_BALANCE
            123          0         12.4
            123          1         13.2
            123          2          1.2
            122          1         15.5
    Elapsed: 00:00:00.02
    SCOTT@CRP1 > select t.*,
    lag(t.prev_balance) over (partition by document_id order by document_id, bill_id) prev_bal1 from test1 t;
    DOCUMENT_ID    BILL_ID PREV_BALANCE  PREV_BAL1
            122          1         15.5
            123          0         12.4
            123          1         13.2       12.4
            123          2          1.2       13.2
    Elapsed: 00:00:00.01
      1* select * from
    (select t.*,
    lag(t.prev_balance) over (partition by document_id order by document_id, bill_id) prev_bal1 from test1 t)
    where bill_id<>0
    SCOTT@CRP1 > /
    DOCUMENT_ID    BILL_ID PREV_BALANCE  PREV_BAL1
            122          1         15.5
            123          1         13.2       12.4
            123          2          1.2       13.2
    Elapsed: 00:00:00.00Now, my problem is, for scenario where document_id = 122, I need prev_bal1 to be 15.5 instead of zero (since there is no value to be carried over from bill_id = 0 for that document_id).
    Everything else should remain the same.
    Is this even possible with 'LAG' function? or am I gonna have to look something exotic like 'MODEL' clause?
    Thank you,
    Rahul.
    Message was edited by:
    RPuttagunta
    Message was edited by:
    RPuttagunta

    Did you try?
    SQL> CREATE TABLE test1 AS  SELECT 123 document_id, 0 bill_id, 12.40 prev_balance
      2    FROM DUAL
      3  UNION ALL
      4  SELECT 123, 1, 13.2
      5    FROM DUAL
      6  UNION ALL
      7  SELECT 123, 2, 1.2
      8    FROM DUAL
      9  UNION ALL
    10  SELECT 122, 1, 15.5
    11    FROM DUAL
    12  ;
    Table created.
    SQL> select *
      2    from (select t.*
      3               , lag(t.prev_balance, 1, t.prev_balance)
      4                  over (partition by document_id order by document_id, bill_id) new_prev_bal1
      5           from test1 t
      6         )
      7   where bill_id<>0
      8  /
    DOCUMENT_ID    BILL_ID PREV_BALANCE NEW_PREV_BAL1
            122          1         15.5          15.5
            123          1         13.2          12.4
            123          2          1.2          13.2
    SQL>

  • Help with LAG () OVER () and dates

    I have the following query right now
      SELECT "DATE",
              "CELL_SITE",
              "LASTV_ATTCNT",
              "LASTV_ATTCNT2",
              "LASTV_BLKCNT",
              "LASTV_DRPCNT",
              "V_ATT_CNT",
              "V_CUST_BLK_CNT",
              "V_DRP_CALL_CNT",
              "LASTD_ATTCNT",
              "LASTD_BLKCNT",
              "LASTD_DRPCNT",
              "D_ATT_CNT",
              "D_CUST_BLK_CNT",
              "D_DRP_CALL_CNT"         
         FROM (  SELECT DATE,
                       CELL_SITE,
                        LAG (SUM (V_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_ATTCNT",
                        LAG (SUM (V_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_BLKCNT",
                        LAG (SUM (V_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_DRPCNT",
                        LAG (SUM (D_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_ATTCNT",
                        LAG (SUM (D_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_BLKCNT",
                        LAG (SUM (D_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_DRPCNT",
                        SUM (V_ATT_CNT) AS "V_ATT_CNT",
                        SUM (V_CUST_BLK_CNT) AS "V_CUST_BLK_CNT",
                        SUM (V_DRP_CALL_CNT) AS "V_DRP_CALL_CNT",
                        SUM (D_ATT_CNT) AS "D_ATT_CNT",
                        SUM (D_CUST_BLK_CNT) AS "D_CUST_BLK_CNT",
                        SUM (D_DRP_CALL_CNT) AS "D_DRP_CALL_CNT"
                   FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI
                  WHERE DATE >
                             (SELECT MAX (DATE) FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)
                           - 2
               GROUP BY DATE, CELL_SITE)
        WHERE DATE >=
                 (SELECT MAX (DATE) - NUMTODSINTERVAL (12, 'HOUR')
                    FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)What I've noticed is that the LAG function is doing kind of what I want but not exactly. Lets say I have data for hours 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 6AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, and that the current hour is 12PM, the LAG function goes back to 12AM, which is what it should be doing.
    but lets say I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, but am MISSING 6AM (no data for 6AM). The lag function will now go back to 11PM instead of 12AM since the 6AM hour is missing.
    if I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM and am MISSING 5AM and 6AM, the data will go back to 10PM then and not just 12AM.
    Can I prevent this from happening and always just go back 12 hours?
    Edited by: k1ng87 on Apr 25, 2013 1:27 PM

    Hi,
    k1ng87 wrote:
    LAG (SUM (V_ATT_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_ATTCNT",
    LAG (SUM (V_CUST_BLK_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_BLKCNT",
    LAG (SUM (V_DRP_CALL_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_DRPCNT",
    Since you want so many columns from the same previous row, it would probably be simpler and more efficient to do a self-join, rather than so many LAG functions.
    What I've noticed is that the LAG function is doing kind of what I want but not exactly. Lets say I have data for hours 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 6AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, and that the current hour is 12PM, the LAG function goes back to 12AM, which is what it should be doing.You're always passing 24 as the 2nd argument to LAG; that means "Return the value from the 24th precding row." If there's a row for every hour, and the current row is 12PM, then wouldn't 24 rows back would be 12PM yesterday, not 12AM? Maybe you meant to pass 12, not 24, as the second argument to LAG. I'll assume you really want the 24th row rom now on, but the technique is the same whether that number is 24 or 12.
    but lets say I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, but am MISSING 6AM (no data for 6AM). The lag function will now go back to 11PM instead of 12AM since the 6AM hour is missing.
    if I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM and am MISSING 5AM and 6AM, the data will go back to 10PM then and not just 12AM.
    Can I prevent this from happening and always just go back 12 hours?A self-join would handle this automatically: it will look for the matching row, without regard for which other rows might be present or absent.
    If you really had to do this with analytic functions, you could use MIN or FIRST_VALUE with a range window:
    RANGE BETWEEN  1 + (.5 / 24)  PRECEDING
          AND      1 - (.5 / 24)  PRECEDINGWhen you ORDER BY a DATE column (don't call it "DATE"), the units are 1 day, so 1+(.5/24) days ago is 24.5 hours ago; that is, the window only includes DATES between 24.5 and 23.5 hours ago.
    If, for some reason, you really wanted to call LAG, then you could do an outer join to guarantee that a row was present for each of the preceding 24 hours.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Can't Create Saved Connection in 11g (Discoverer Plus).

    We're getting ready to go live with a new installation of Discoverer Weblogic 11g, but we have run into a problem. We are getting errors when we have any user try to create a saved login connection from their login screen. We hit "Create Connection" and enter all the required login info (as we always did with our 10g version), but when we hit 'Apply' or 'Apply and Connect' we get the following errors.......
    A connection error.
    - Oracle BI Discoverer Viewer cannot save the connection. Check for other errors.
    - ORA-04063: package body "PROD_DISCOVERER_PS.WWSSO_API_PRIVATE" has errors ORA-06508: PL/SQL: could not find program unit being called: "PROD_DISCOVERER_PS.WWSSO_API_PRIVATE" ORA-06512: at line 1
    Users can login just fine when they enter all their info on the login screen, this is only happening when we try to create the saved connection. Is anyone else running into this on 11g? Is there a setting we are missing or something? Maybe something in the pref.txt file? Any help would be appreciated, especially since we are being asked to go live soon. Thanks!
    Here is our system setup:
    Oracle BI Discoverer 11g (11.1.1.4.0)
    Oracle Business Intelligence Discoverer Plus 11g (11.1.1.4.0)
    Discoverer Model - 11.1.1.4.0
    Discoverer Server - 11.1.1.4.0
    End User Layer - 5.1.1.0.0.0
    End User Layer Library - 11.1.1.4.0
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    Java Virtual Machine:     Sun Microsystems Inc. 1.6.0_29
    JVM Memory Available:     9046KB out of 37372KB
    Operating System:     x86 Windows XP 5.1
    Using protocol: RMI protocol over JRMP transport

    Additional info:
    Based on the error messages, we can see something is wrong with the package being called. We had a long running help ticket with Oracle opened, but in our opinion, it was not really resolved. We provided the following info after a request from Oracle....
    The package does exist. The package is valid but the package body is invalid due to missing dependant objects
    It is owned by PROD_DISCOVERER_PS.
    The database version is 11.2.0.1.0 (64 bit)
    SQL> select OWNER, OBJECT_TYPE
    +2 from all_objects+
    +3 where object_name = 'WWSSO_API_PRIVATE';+
    OWNER OBJECT_TYPE
    PROD_DISCOVERER_PS PACKAGE
    PROD_DISCOVERER_PS PACKAGE BODY
    We have tried to recomplie the package, still invalid.
    After some further questions we were asked to provide info on the app_registry.......We got an error when trying that.......
    The app_registry object does not exist ...
    SQL> connect sys as sysdba
    Enter password:
    Connected.
    SQL> select comp_id,version,status from app_registry;
    ERROR at line 1:
    ORA-00942: table or view does not exist
    In the end (after a lot of back and forth), Oracle could not reproduce our problem on their test system. Because their test system uses Enterprise Edition and we installed Standard Edition, their solution was that the issue is caused because we are using Standard Oracle DB and we should be using Enterprise Edition. Creating a saved connection doesn't sound at all like something that would be affected by Standard or Enterprise edition. That's not an easy "solution" for us right now, and we can use a real fix. That's like taking your car into the shop because your blinkers don't work on your 2010 model car and the dealer's solution is "Oh, your 2010 car blinkers don't work? We have a 2011 model and they work just fine. You'll need to buy a 2011 car so the turn signals function."

  • MDX Rank Over Partition

    Are there any MDX gurus who can help me?
    I am trying to produce an MDX query that generates a ranked result set, within this I am trying to get two levels of ranking based on Net Sales, firstly the ranking within the overall set, and secondly a ranking partitioned by an attribute dimension (the equivalent of RANK () OVER (PARTITION BY ...) in SQL Server), with the final result set sorted alphabetically by the attribute name and secondly by Net Sales. So far I have got the sorting and the overall ranking to work but not the partitioned rank. Any solution will need to be fast as the base dimension has 100K members.
    My current MDX looks like this:
    WITH
    SET [Divisions] AS '[AttributeContract].[Att_CC01].Children'
    SET [ContractsByDiv] AS
    'GENERATE(
    ORDER(
    [AttributeContract].[Att_CC01].Children,
    AttributeContract.CurrentMember.[MEMBER_NAME],
    BASC
    CROSSJOIN(
    AttributeContract.CurrentMember
    ORDER(
    NonEmptySubset(
    UDA([Entity].[Entity Contract Reporting], "Contract")
    [Net Sales],
    BDESC
    MEMBER [Account].[Overall Rank] AS 'Rank([ContractsByDiv].CurrentTuple,[ContractsByDiv],[Net Sales])'
    MEMBER [Account].[Rank In Div] AS '1'
    SELECT
    [Net Sales]
    ,[Overall Rank]
    ,[Rank In Div]
    } ON COLUMNS,
    [ContractsByDiv]
    } ON ROWS
    FROM HCREPRT2.Analysis
    WHERE
    [Year].[FY13],
    [Period].[BegBalance],
    [ISBN Type].[Total ISBN Type],
    [Lifecycle].[Front List],
    [Scenario].[DPG_Budget],
    [Market].[Total Market],
    [Version].[Working],
    [Sales Channel].[Total Sales Channel]
    Any suggestions as to how to do this or whether it is possible?
    Regards,
    Gavin
    Edited by: GavinH on 07-Mar-2012 02:57

    This was the solution I came up with:
    The following query returns a result set with the the data ranked across the overall set and with a ranking partioned by division:
    WITH
    SET [Divisions] AS 'ORDER([AttributeContract].[Att_CC01].Children,AttributeContract.CurrentMember.[MEMBER_NAME],BASC)'
    SET [EntitySet] AS 'ORDER(NonEmptySubset(UDA([Entity].[Entity Contract Reporting], "Contract")),[Net Sales],BDESC)'
    SET [ContractsByDiv] AS
    'GENERATE(
    [Divisions],
    CROSSJOIN(
    AttributeContract.CurrentMember
    NonEmptySubset([EntitySet])
    -- Rank in whole data set
    MEMBER [Account].[Overall Rank] AS 'Rank([ContractsByDiv].CurrentTuple,[ContractsByDiv],[Net Sales])'
    -- Ranking in division
    MEMBER [Account].[Rank In Div] AS
    'Rank(
    ([AttributeContract].CurrentMember,[Entity].[Entity Contract Reporting].CurrentMember),
    CROSSJOIN(
    AttributeContract.CurrentMember
    NonEmptySubset([EntitySet])
    [Net Sales]
    -- Rownumber
    MEMBER [Account].[RowNumber] AS 'RANK([ContractsByDiv].CurrentTuple,[ContractsByDiv],1,ORDINALRANK)'
    SELECT
    [Net Sales]
    ,[Overall Rank]
    ,[Rank In Div]
    ,[RowNumber]
    } ON COLUMNS,
    [ContractsByDiv]
    } ON ROWS
    FROM HCREPRT2.Analysis
    WHERE
    [Year].[FY13],
    [Period].[BegBalance],
    [ISBN Type].[Total ISBN Type],
    [Lifecycle].[Front List],
    [Scenario].[DPG_Budget],
    [Market].[Total Market],
    [Version].[Working],
    [Sales Channel].[Total Sales Channel]
    The key was to use the cross join portion of the generate statement used to create the overall set as the set for the intra divisional ranking.

  • Discoverer plus initialisation error

    Hi!
    When I try to launch Discover Plus I get the following error:
    "Unable to connect to Oracle Discoverer Application Server
    Attempt1: RMI Protocol over http transport:
    Incorrect response from (server name)"
    We initially thought that this was a firewall issue, but it's not.
    Any ideas?
    Cheers,
    Martin

    Hi,
    I've only ever heard of this problem with Discoverer Plus, as it's only Disco Plus that uses 'RMI protocol over JRMP Transport', which is a way for the Discoverer Plus applet to communicate with the server. Anyway, the solution as given by Oracle at http://otn.oracle.com/products/discoverer/htdocs/hints/htm/plus_Connect.htm is:-
    "If you’re using Internet Explorer and try to establish a Discoverer plus 9.0.2.39.1 session, and you may encounter this error on some workstations:
    “Unable to connect to the Oracle Discoverer Application Server: RMI protocol over JRMP transport: incorrect response from from servlet at http://yourmachinename.com:7778/discoverer/plus”
    If the answer to either of the following questions is 'yes', then this document may help you correct your environment.
    Can you connect using Netscape?
    Can you connect from other workstations?
    Solution:
    Check your web listener error_log. In unix environments it is found in [ORACLE_HOME] /product/ias902/Apache/Apache/logs - filename: error_log.
    Use “tail -f error_log” to view the contents of the error_log file.
    If the server error_log contains “[OSSO] Warning: Failed to decrypt OHS_ID cookie value. Bailing ...”, then it is possible that cookies are being stored in the browser (not intended), whereas the cookies in question are designed to be non-persistent. To rectify this do as follows.
    · Enter Start -> settings -> Control Panel -> Internet options -> General -> Temporay Internet Files -> Settings – View Files
    or
    · [Driveletter]:\Documents and Settings\[username]\Cookies
    Delete all Cookie files from ias server and sso server.
    For Example:
    Name
    Internet Address
    [email protected]
    Cookie:[email protected]/
    discoverer
    Cookie:[email protected]/discoverer
    You can search for cookie files by using * wildcards i.e. *servername*, or anonymized:
    Name
    Internet Address
    [username]@servername.domainname
    Cookie:[username]@servername.domainname/
    discoverer
    Cookie:[username]@servername.domainname/discoverer
    After cookie files have been deleted, please reboot your workstation and reconnect to Discoverer Plus. Now it should work."
    hope this helps
    Mark

  • How to pass parameter to a Discoverer Plus OLAP Worksheet??

    Hi,
    I have used discoverer plus OLAP and portal to develop executive dashboards in my company. I put my date dimension in Page Item of discoverer plus OLAP worksheet to view a specific week/month/year of analysis i.e. Jul-07.
    Now I have to open all the worksheets and change the page item value when week/month ends. If it was 'Jul-07' then I have to change it as 'Aug-07'.
    In discoverer plus OLAP we can't pass parameters as we can in discoverer relational.
    Can someone help me how I can set the new values without opening discoverer worksheets?
    Regards,
    Shahid

    Dear Shahid,
    I downloaded the Oracle Application Server SOA Suite 10.1.3.1.0. While installing It gave me two options
    1. Basic Install
    Install J2EE server and SOA suite of applications including BPEL, ESB
    and OWSM.
    2. Advance Install (This gives 4 options)
    a. J2EE Server, Web Server and SOA suite
    b. J2EE Server and Web Server
    c. J2EE Server
    d. Web Server\
    According to your instructions I need to install it as Insfrastructure, BI and portal. Now can you tell me which option of the install I should select in order to meet the requirements of Infrastructure, BI and Portal.
    Because I am very new in this technology so If you can guide to me to get started at least then I can follow the Oracle Tutorial for further training.
    Thanks very much in this regards.
    __Asif

  • How do I get this query into Discoverer Plus

    Hi all,
    I have the following query:
    SELECT h.hrs, NVL(Quantity, 0) Quantity
    FROM (SELECT TRIM(to_char(LEVEL - 1, '00')) hrs
    FROM dual
    CONNECT BY LEVEL < 25) h
    LEFT JOIN (SELECT TO_CHAR(event_date, 'HH24') AS during_hour,
    COUNT(*) Quantity
    FROM user_activity u
    WHERE event_date BETWEEN
    to_date('15-JUN-2010 14:00:00', 'DD-MON-YYYY HH24:MI:SS') AND
    to_date('16-JUN-2010 13:59:59', 'DD-MON-YYYY HH24:MI:SS')
    AND event = 'user.login'
    GROUP BY TO_CHAR(event_date, 'HH24')) t
    ON (h.hrs = t.during_hour)
    ORDER BY h.hrs;
    Which produces the number of actions performed (from an event table, user_activity) grouped by the hour of the day they occurred (including displaying hours that have zero records - this bit is important!). I want to be able to put this into Discoverer plus as a worksheet, but I'm having trouble trying to figure out how.
    I was able to create a custom folder in Administrator for the select from DUAL, but I cannot link it to the user_activity table because there's no relationship between to two tables to create a join.
    The user_activity table is:
    USER_ID - VARCHAR2(8 CHAR)
    EVENT_DATE - DATE
    EVENT - VARCHAR2(100 CHAR)
    The custom folder is this part of the SQL:
    SELECT TRIM(to_char(LEVEL - 1, '00')) hrs FROM dual CONNECT BY LEVEL < 25
    Any suggestions would be greatly appreciated.
    Thanks.
    Edited by: Cyntech on Aug 12, 2010 10:41 AM

    KK wrote:
    hi,
    In the custom folder we can join tables,but the thing is you said ther is no join between them.
    I would suggest you to built this query into a view and use this view in the DUAL table by writing inline query or subquery what ever way.
    This is the only possibility i can think off.
    Hope it helps you.
    By,
    KKHi,
    Thanks for the reply, though I'm not sure that I understand what you are suggesting.
    Which query would you turn into a view? If you are referring to the select from dual, then how would the view be any different from the custom folder? You still would not be able to join it to user_activity as there are no common columns.
    Edited by: Cyntech on Aug 12, 2010 2:49 PM

  • Over Partition by in OWB 9i

    Hi,
    I am using OWB V9i. I need to implement an sql statement in a mapping.The statement is
    CASE WHEN (tr_dt=lead(tr_dt) OVER(PARTITION BY ID ORDER BY ID,tr_dt))
    THEN lead(ef_dt) OVER(PARTITION BY ID ORDER BY ID,tr_dt)
    ELSE tr_dt
    END
    I am not able to put the case statement in an expression as it has OVER PARTITION BY which the expression operator is not accepting. Is there any way i can implement the same in the mapping without using a table function or any other procedure???
    Regards
    Bharath

    OWB's support for analytics has always been pretty sparse. They did release a doc that showed a way to build some analytics using various workarounds here:
    http://www.oracle.com/technology/sample_code/products/warehouse/files/analyticfunctions.pdf
    However my approach has always been to tend towards simplicity. A convoluted "workaround"mapping is harder to tune, troubleshoot, or maintain, and I always worry about how OWB will handle such workarounds over subsequent release upgrades. So, for anything not clearly natively supported by OWB - I build a view with the analytic and use that as my source.
    Mike

Maybe you are looking for

  • Help needed in extracting values from XML

    SAMPLE XML: - <Form1> - <Name> <Ttl>MR</Ttl> <Fore>ABC1</Fore> <Sur>XYZ2</Sur> </Name> - <Address> <Line>ADD_LINE_1</Line> <Line>ADD_LINE_2</Line> <PostCode>PST CDE</PostCode> </Address> <BirthDate>0001-01-01</BirthDate> - <Details> <TotalEarnings>12

  • Wrong value with calculated item in pivot table

    I have a report with 4 columns: First Column are Department Dimension Second Column is Actual value Third Column is Previous value Four Column is: ((Actual Value-Previous Value)/Previous Value))*100 that called Var Then I do a pivot table and I have

  • HTTP Proxy: My grogram runs even I put a wrong proxy host and port

    I'm new to network programming, so I just use System.setProperty() for easy. But I don't know why this piece of code runs with whatever proxy I set: (I download a file and display in a in JTextArea, this is the ActionListener for 'Download' button)  

  • LR or Bridge Bug: Keyword Container

    If you import images already keyworded using Bridge (Keyword Container) For example: Container (Places) Subkey (United Kingdom) Subkey (London) Container (Immediate Family) Subkey (Mom) Subkey (Dad) I found that some images with keyword tree structur

  • Form builder 10g installation

    Hi All, I want to download Forms10g into my system.So plese let me know the steps to download and let me know how to compare 2 ".fmb" files using Form builder. Please give me the steps. Thank you.