Derived table

Plz re-Play
  @ functions,@ prompts @ awareness are using in Derived table

Hi,
You can use @functions, @Prompts, @awareness in Derived Tables.
But
■Do not use derived tables instead of aggregate tables.
And see the following site for full Information.....
http://www.msatish.com/sap-businessobjects-designer-universe-using-derived-tables/
All the Best,
Madhu...

Similar Messages

  • How do I use Derived Table to dynamically choose fact table

    How do I use the Derived Table functionality to dynamically choose a fact table?
    I am using BO XI R2 querying against Genesys Datamart kept in Oracle 10g.  The datamart contains aggregated fact tables at different levels (no_agg, hour, day, week, etc...) I would like to build my universe so that if the end user chooses a parameter to view reports at daily granularity, then the daily fact table is used;  choose hourly granularity, then hourly fact table is used, etc....
    I tried using dynamic SQL in Oracle Syntax, but Business Obljects Universe didn't like that type of coding.
    The tables look something like this:
    O_LOB1_NO_AGG o
    inner join V_LOB1_NO_AGG v on o.object_id = v.object_id
    inner join T_LOB1_NO_AGG t on v.timekey = t.timekey
    Likewise, in the 'hour', 'day', 'week', etc... fact tables, the Primary Key to Foreign Key names and relationships are the same.  And the columns in each O_, V_, T_ fact table is the same, or very similar (just aggregated at different levels of time).
    I was thinking of going a different route and using aggregate aware; but there are many Lines of Business (20+) and multiple time dimensions (7) and I believe aggregate aware would require me to place all relevant tables in the Universe as separate objects, which would create a large Universe with multiple table objects,  and not be maintenance-friendly. I also was going to dynamically choose Line of Business (LOB) in the derived tables, based on the end user choosing a parameter for LOB, but that is out-of-scope for my current question.  But that information sort of points you down the train of thought I am travelling. Thanks for any help you can provide!

    You can create a derived table containing a union like the following:
    select a,b,c from DailyFacts where (@prompt('View'....) = 'Daily' and (<rest of your where conditions here if necessary>)
    union
    (select a,b,c from MonthlyFacts where (@prompt('View'....) = 'Monthly' and (<rest of your where conditions here if necessary>))
    union
    (select a,b,c from YearlyFacts where (@prompt('View'....) = 'Yearly' and (<rest of your where conditions here if necessary>))
    I assume that you are familiar with the @prompt syntax
    Regards,
    Stratos

  • Problem with WebIntelligence and Universe Designer Derived Table

    Hi people, i have an issue with a report in WebIntelligence that i want to build. Here it goes:
    I created a derived table that brings every material that has or not any movement. The thing is that when I build the report using other information like Material Name, for example. The report filters by the coincidence between materials in the derived table and the SAP Standard table. I tried to modify the SQL query but, Oracle does not allow it.
    So here are my questions:
    1)Is any way to do a Left outer join in order to have any single material and do not allow WebIntelligence to do Inline views?
    2)Do i have to modify the derived table? and use the standard tables?
    3)Can i work with a derived table that does not have any join with the standard tables?
    Thanks in advance,
    Reynaldo

    If I understand you correctly, it sounds like you are getting an inner join where you want an outer join? You have several options:
    1. You can do an outer join in the universe, or even embedded in your derived table (if that is what you are trying to do)
    2. You can have a derived table that is not joined with any other tables in the Universe. But you will have to merge the dimensions in the Webi report, and then be sure to put the correct dimension(s) on the report in order to reflect the outer join you want.
    I hope that helps.

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help needed in Derived Table

    Dear Experts,
    Can anyone tell me in which scenario we will go for derived table?  We are creating a report on top of a Cube,
    Thanks,
    Kind Regards,
    Sathish Kumar.N

    Hi Sathish,
    Hope this helps:
    http://scn.sap.com/thread/2019524
    http://www.forumtopics.com/busobj/viewtopic.php?p=684054&sid=13e89b7f7b9e97d6921e9899023e3929
    http://www.forumtopics.com/busobj/viewtopic.php?p=770433&sid=1f947ce435f0c0b96ebed248a1c908a0
    regards,
    M

  • CASE Statement is not working Derived table

    Hi All,
    in the bello SQL Statement case statement is not working in derived table. I am new to creation of derived table if any body knows plz kinldy help me out on this.
    SELECT x.market, x.droprate as med1
    FROM
    (select upper(market_name) as market, fulldate as date_value,
         (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN (month(BBHDLY.FullDate)}>= 6 and { year(BBHDLY.FullDate)} = 2011) or {fn year(IDENSLABBHDLY.FullDate)} > 2011
    THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >= GETDATE()-46
                   group by market_name, fulldate) x,
    (select market_name as market, fulldate as date_value,
    (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN ({fn month(BBHDLY.FullDate)}>= 6 and {fn year(BBHDLY.FullDate)} = 2011) or {fn year(BBHDLY.FullDate)} >
    2011 THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >=GETDATE()-46
                   group by market_name, fulldate) y
    where x.market = y.market
    GROUP BY x.droprate, x.market
    HAVING
       SUM(CASE WHEN y.droprate <= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)+1)/2 AND
       SUM(CASE WHEN y.droprate >= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)/2)+1
    Thanks

    It looks like SQL Server or Sybase given that you're using getdate().
    As such, Vinesh's comment to use decode is wrong - decode is  Oracle syntax.
    Looking at your statement again, I've noticed the following:
    you have no { to match the first } - not sure why you're using them anyway.
    you haven't given x.market a name - use x.market as market instead
    use coalesce instead of nullif if you're on SQL Server.

  • Can we create prompts in Derived Table sql query

    Hi,
    I am trying to define derived table sql query as below. Though the syntax parsing is going through but when I am generating the report it is throwing and invalid prompt definition error.
    " select * from table_a where call_direction = @Prompt('Enter Call Direction','A','"derivedtable_a".SHORT_STRING',mono,free,not_persistent,) and
    where call_type = @Prompt('Enter Call Direction','A','"derivedtable_b".SHORT_STRING',mono,free,not_persistent,) "
    Can somebody please share your thoughts if this can be achieved in universe or not ?
    Appreciate immediate responses as it is a show stopper for my deliverable.
    Thanks in advance.
    Thanks and Regards,
    Shireen.

    Hi Shireen
    We can use prompt in the derived table. There is issue with the SQL that you have used while creating the Derived Table.
    Instead of using the "derivedtable_a".SHORT_STRING' field use the object from the class on which you are creating the derived table.
    For example: If you are creating a derived table in the sample universe efashion on Agg_yr_qt_rn_st_ln_ca_sr table then use the following query:
    SELECT *
    FROM Agg_yr_qt_rn_st_ln_ca_sr
    WHERE Agg_yr_qt_rn_st_ln_ca_sr.Yr = @Prompt ('Enter Value','C','Time Period\Year',mono,constrained)
    Hope this helps!
    Thanks

  • Adding derived table  to-Universe issue!

    Hi,
    I am trying to add a derived table to my Universe by writing a SQL query, after some length of the query its not enabling me to write more.Could soemebody suggest is there any limit I can write upto or is there anyway I can increase the capacity of the length of the query.Thanks in Advance.

    How big is your query. I think there is a limit based on the edit box of about 32k but that is all
    It is possible to create derived tables based on other derived table using the @DerivedTable function. You might be able to break your query into smaller parts and build it that way
    Regards
    Alan

  • Reference a Derived table in another Derived Table

    Is it possible to reference a derived table from another derived table? I am using Business Object XI 3.0.

    This is not possible as the Designer wants physical tables...
    What you could do is create the second derived table as follows:
    SELECT     table1.col1,
         table1.col2,
         table2.col1,
         table2.col2
    FROM     table1,
         (SELECT col1,
              col2
         FROM     atable) table2
    Regards
    Jacques

  • Derived Table creation

    Hi, we are working on Business Objects Migration 6.1 to BOXIR2 project.plz any one help me Derived table creation for Free Hand SQL Reports?.How to use promt functions also.........?
    Thanks for advance....
    Thanks&Regards
    Ramu

    Ramu,
    Your question is posted in the General forum, but I think you might want to close this entry and re-post in one of the two following forums:
    Web Intelligence
    [SAP BusinessObjects Web Intelligence;
    Universe Designer & Business Views Designer
    [Semantic Layer;
    Thanks,
    John

  • Derived table in univ's

    Hello,
    Plz Ans me-
    What is Derived table, where it is using derived table? advantages& Di- advantages derived table?

    Hi,
    Derived tables are nothing else but InLine views (with the one additional benefit of being able to use @prompt syntax in a derived table) and as such do not contain any data, everything is calculated on the fly during query execution, meaning: whenever you refresh a report.
    Derived tables are tables that you define in the universe schema. You create objects on them as you do with any other table. A derived table is defined by an SQL query at the universe level that can be used as a logical table in Designer.
    Derived tables have the following advantages:
    u2022 Reduced amount of data returned to the document for analysis. You can include complex calculations and functions in a derived table. These operations are performed before the result set is returned to a document, which saves time and reduces the need for complex analysis of large amounts of data at the report level.
    u2022 Reduced maintenance of database summary tables. Derived tables can, in some cases, replace statistical tables that hold results for complex calculations that are incorporated into the universe using aggregate awareness. These aggregrate tables are costly to maintain and refresh frequently. Derived tables can return the same data and provide real time data analysis.
    Derived tables are similar to database views, with the advantage that the SQL for a derived table can include BusinessObjects prompts.
    Thanks,
    Amit

  • Derived table query size limit 65KB?

    Hi.  When in Edit Derived Table, if I paste a query larger than about 65KB, the end of the query will be cut off.  Then I must create multiple Derived Tables.  Has anyone else experienced this?  Do you find the limit to be about 65KB?
    Thanks,
    Mike

    Most databases cut off at that limit, so it's not really a Designer limitation.
    Frankly, if you have a derived table with 65K of SQL you need to fix your ETL.

  • Derived Table - Stored Procedure.

    Hi all,
    Can any tell how you call stored procedure from Derived table.
    and how manage the IN parameters ?
    thnx in advance

    Hi Reddeppa,
    Could you please specify the database you are working on?
    Also , BO Supports Derived Tables if and only if the underlying database supports In-line Views:
    Syntax: Select tot from ( select fun(x) as tot from table) dtab ;
    Ex: Select workdays from ( select workdays('10/10/2004' , '20/4/2005') as workdays from dual ) DerivedTab ;
    Run the above SQL at the Database end, if it runs successfully then follow the below steps
    1. Create a function at the database end.
    for example :
    Create or replace function testf(no number) return number
    as
    Begin
    Return(10);
    End;
    2. Open the universe
    3. Create a derived table using the following syntax:
    for example :
    Select TestF(10) from dual;
    4. Click on parse and Ok.
    5. Now create a report using Derived table
    Note: This is tested on Oracle database.
    Hope this will help you.
    Regards
    Sheeba

  • Prompt error/invalid in Derived table

    Hello everyone...
    I have a filter in my Universe.
    filter1
    dbo.RPT_YEAR_MONTH= dateadd(month, -3, @Prompt('Enter values for Rpt Year Month:','N','Folder\MeasurePractice\Rpt Year Month',Mono,Constrained))
    Now i want to write a derived table...I expect that the derived table should select data for primed status when input for reporting period is given and miuns 3 months to that input perios and give data for Primed Status.
    But i am getting an invalid prompt error for below...
    Select
    dbo.vMH_MEASURE_PROVIDER.PRIMED_STATUS
    from
    dbo.vMH_MEASURE_PROVIDER
    Where
    dbo.vMH_MEASURE_PRACTICE.RPT_YEAR_MONTH= dateadd(month, -3, @Prompt('Enter values for Rpt Year Month:','N','Folder\MeasurePractice\Rpt Year Month',Mono,Constrained))

    Please check the Prompt definition and whether you are entering all the parameters in the prompt syntax.  As I could see there are only 5 parameters there in your prompt definitions

  • @prompt functions usage in Derived table

    How can we use prompt functions in Derived table?.Please repaly ASAP.
    Advanced thanks.
    Thanks&Regards
    Ramu

    Hi Ramu,
    It is quite straight foward.You define your derived table using the normal sql but then put in the @prompt code in the where clause.
    This worked for me in XI 3.0 using the Efashion universe.
    SELECT
    Article_Lookup_criteria.Article_Lookup_criteria_id,
    Article_Lookup_criteria.Article_criteria_id,
    Article_Lookup_criteria.criteria_type
    FROM
    Article_Lookup_criteria
    WHERE
    Article_Lookup_criteria.criteria_label = @prompt('Label,'A',,Mono,Free,Presistent)
    Regards
    Alan

Maybe you are looking for