@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

Similar Messages

  • 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

  • NVL in prompt on date in derived table

    hi
    needed some help in derived table end date is bind variable data base is oracle
    like this how to apply prompt on this  if end Date =0 or no value could accept in prompt
    ch.endDate <= nvl(:end Date,ch.endDate)
    i've tried in report level but optional prompt is not available could you please help me out of this

    Hi
    derived table will not pass null values using @prompt
    use this formula
    To_date(CASE WHEN @prompt(':bind variabe','D',,mono,free,persistent,{'01/01/2099'}) = '01/01/2099' then to_char(ch.end_date) else @prompt(':bind variabe','D',,mono,free,persistent,{'01/01/2099'}) END)
    for only in this situation it will work ch.end_date=NVL(:end date,ch.end_date)
    thanks
    Ravi Kumar

  • Way to use Prompts , UDFs in Derived table

    Hi guys,
    In our org we have been using prompts in the derived tables. Derived table would return Single final select statement. Now that report requirements are complex we would have to use table variables, UDFs, and many select, delete, update statements. How should we handle many such statements in a derived table to return a result set for the report?
    If we cannot handle many selects in a derived table, I am hoping to use Table-Valued Function in the derived table something like this:
    create myFunction()
    Returns Table as (......)
    select * from myFunction()
    But then I should be able to use the user input prompts in the syntax: @PROMPT('test1','A',Multi,,). The user would input 5 such prompts from the report.
    Any ideas from anyone who has used Prompts, UDFs in a derived table?
    Environment: BO X1r2, Crystal x1r2, sql server 2005
    Thanks !

    In the past, I have opted to create complex logic in a server-side procedure, complete with prompts.  The prompt are passed to and presented in Crystal.  This way, instead of splitting the logic between UDFs, derived tables and prompts, you can keep the logic in a relatively tidy procedure.

  • 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

  • How to use LOV on a derived table dependent on a prompt for Webi web intelligence view.

    The semantic layer has not created a defined LOV for the derived table.   This only happens when pulling columns from derived table which depends on a prompt for unique selection.  When pulling from derived table that does not depend on a date prompt does not have an issue in Webi.
    I don't know if this is a universe design issue or WEBI.
    Webi Rich internet application   selects the date prompt first but if click on Storeno in List it returns a LOV with auto refresh.
    Webi Web Intelligence returns  List of Values for current prompt requires values for following prompts:   and when you click to refresh  webi responds with 'undefined'

    Hi…
    Can you check Prompt : Store No is created at universe level and defined the syntax correctly
    @Prompt(1,2,3,4,5)  insert a prompts in SQL. When the user runs the query, the user is prompted to enter a value for a refresh each time.
    1 = 'Prompt Text Message'
    2 = 'Prompt Type'  (i.e. A,N,D,U)
    where A= Character, N= Number, D= Date, U= Unit.
    3 = 'Class Name/ Object Name'
    4 = 'Multi/ Mono'
    Multi means Multiple ( Example = 2004,2005,2011)
    Mono means Single ( Example = 2012)
    5 = Free/Constrain (Type value or select value in LOV/ Select Value)
    Example for creating a @prompt filter is below
    @Prompt('enter year','A','time period/year', Multi', Free)
    Pointer to a “List of Values” from an existing universe object. You invoke the target list of values by double-clicking on the object contain ing the list of values that you want to use in the "Classes and Objects" panel. This gives the Class name and the Object name, separate ed by a backslash. It must be enclosed in single quotes. For example: 'Client\Country'. When you are using “Index Awareness”, and you want to return the key values for an object,set the 5th value to primary_key
    • Hard-coded list of single values or value pairs. The values in a pair are separated by a colon. Each value is enclosed in single quotes. The pairs of values are separated by a comma. The whole list is enclosed in curly brackets. Set the constraint to primary_key
    http://www.businessobjectstips.com/tips/web-intelligence/prompt-functions-the-next-step-optional-prompts/

  • 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

  • The ORDER BY clause is invalid in views, inline functions, derived tables..

    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: 16001] ODBC error state: 37000 code: 8180 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 37000 code: 1033 message: [Microsoft][ODBC SQL Server Driver][SQL Server]The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
    I have already tried to follow this thread below, but no change.
    HI
    In this specific report ran above the offending sql uses a CTE.
    I am on 11.1.1.6.1, Windows Server 2008
    Currently in testing phase in migration from 10g.
    I know what the error means, just not how to resolve it or what setting may be causing this.

    In Physical layer, go to specific database(Physical layer's) properties, database features tab -> Un check the EXPRESSION_IN_ORDERBY_SUPPORTED.
    For that failed report, go to Answers-> advance tab-> Look for 'Advanced SQL Clauses'
    Check this box to issue an explicit Select Distinct
    Let me know updates
    If helps Pls mark correct or helpful

  • Derived tables with prompts - based universe

    why can't I use derived tables with prompts - based universes on Dashboard Design 4.0? I mean I can add to Dashboard Design data coming from a universe like that but the prompts don't show in the query panel in Dashboard Design. Could it be becuase my universe was created first as an unv and then I transformed it to unx?

    Good day Yuvraj,
    Thank you for your response.
    Basically, I have 2 classes based on physical tables:
    Product (P); and
    Time/Calendar (T/C).
    Two classed based on derived tables:
    Stock on Hand (SoH); and
    Stock Movements (SM)
    The derived tables SQL code selects (Quantity and Selling Price) from the SoH table and joins to the T/C table with conditions and a Where clause to restrict the data output to the last 2 months (the same applies to the SM derived table).
    Example code below:
    SELECT  q.sm_table _no, q.tim_cal_no, q.quantity, q.selling_price
    FROM    tim_cal_table p,
                  sm_table q
    WHERE  q.tim_cal_no= p.tim_cal_no
    AND        p.day between to_char(sysdate - 60,'DD/MON/YY') and to_char(sysdate - 1,'DD/MON/YY');
    Now, the SoH table and the SM table are joined (in the universe schema) to the P table and T/C table using Primary Keys (which are shared by all the tables - physical and derived i.e. foreign keys on the SoH and SM tables used in the derived tables).
    Now to answer your questions:
    Do you get data in case you take objects only from derived table class?NO
    Does the columns used to join physical table and derived table has matching values? YES. I mean to say is the join getting satisfied? YES. Checked Universe Integrity - structure, objects, joins, conditions, loops, context and cardinalities - everything is OK.
    Adding to this, is the data type same for both the columns (on which join is set) or is there any typecasting required? YES - checked the data types of the primary/foreign keys that join the tables and they all match, except for one on the SM table -  the foreign key has 6 set for precision (instead of 5 as per the other columns), however the data type is Numeric so this shouldn't be an issue.
    I hope this helps to clarify the nature of the problem.
    Thank you.
    Regards,
    B

  • Invalid prompt Error in derived table

    hello All,
    I have the below query which works in SQL server...but the same query in derived table is giving invalid prompt error when instead of hardcoding the value...I gave  @prompt for user input value.
    SELECT
      convert(varchar(6), dateadd(MM,-3, convert(datetime, substring(cast(EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE.RPT_YEAR_MONTH as varchar), 5,2) + '/' + '30' + '/'+ substring(cast(EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE.RPT_YEAR_MONTH as varchar), 1,4))), 112) as prequarter,
      Primed_Status,
      EHR
    FROM
      EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE
      where RPT_YEAR_MONTH = '201406'
    SELECT
      convert(varchar(6), dateadd(MM,-3, convert(datetime, substring(cast(EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE.RPT_YEAR_MONTH as varchar), 5,2) + '/' + '30' + '/'+ substring(cast(EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE.RPT_YEAR_MONTH as varchar), 1,4))), 112) as prequarter,
      Primed_Status,
      EHR
    FROM
      EMR_REPORTING.dbo.vMH_MEASURE_PRACTICE
      where RPT_YEAR_MONTH = @Prompt('Enter values for Rpt Year Month:','N','Folder\MeasurePractice\Rpt Year Month',Mono,Constrained)
    Thanks in advance for any inputs.
    Regards.

    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

  • 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

  • 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...

  • 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

  • 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 - 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

Maybe you are looking for

  • (VC707 board) How to use an Ethernet on XPS tool.?

    Hello. I'm participating in a project that compose a microblaze-based etherent system . For this project, I'm using the Xilinx EDK. Then, I met a problem, yesterday. On the EDK XPS tool, the implementation process was failed, because of the axi_ether

  • Issue setting up new Airport Express on OS 10.8 and Airport Utility 6

    My network is a lastest model Airport Extreme and computers running 10.8 Mountain Lion. I needed to extend my wireless network so I purchased the newer model Airport Express. Using Airport Utility 6, I followed the screen prompts to extend the networ

  • Imac 10.7.5 drops all network connections

    I am using an iMac 10.7.5 that has started to drop the network connection (both ethernet and wireless). Using in a corporate environment on a Cisco switch. No other computers on this switch losing their connections. Have an Mac Book Pro that can conn

  • Get skype call log from a year ago

    Dear Skype friends, i'm in a middle of a huge law suit and i need to show my skype chat logs for a specific contact i chat with from June 2012 untill September 2013. Please, is there any way to get that info from my account?

  • Settings in MIDP

    Hello I'm trying to build a settings class for mobile devices, but the problem is that I found only one possibillity to save settings, and that's record stores. Record store's draw back is that I shall read my settings with record's associated id, so