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

Similar Messages

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

  • 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

  • Why its showing error : Invalid Object Name 'table name' when we try to insert data ?

    Hi,
        When i try to insert data in the database with the following query
                    con.Open();
                    cmd = new SqlCommand("insert into good(ID,Name) values('" + textBox1.Text + "','" + textBox2.Text + "')", con);
                    cmd.ExecuteNonQuery();
                    MessageBox.Show("Insert success");
                    con.Close();
        its showing following error Invalid Object Name 'good'

    Use 3-part naming like: MyDatabase.dbo.good(ID,Name) .
    Also consider using stored procedure for database INSERTs.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • 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

  • 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

  • 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

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

  • Fatal error when trying to add derived table

    Hello,
    I'm new at desiging a universe. I get the following a fatal error when trying to add a derived table to my universe:
    1 processor x Family 15 Model 0 Stepping 0
    Windows 2000 Workstation  v5.1 build 2600 (S)
    Physical Total/Avail: 2.097.151 Kb / 2.004.940 Kb
    Temp directory C:\DOCUME1\xxxxxx\LOCALS1\Temp\ (1 Kb available)
    'Unknown' video card
       1280 x 768 in true color
    (doesn't make sense to me)
    I use an ODBC connection that connects to a MySQL database. When I test the connection it's fine.
    I am trying to add a derived table because it seems that my universe cannot produce LEFT OUTER JOINS.  I read somewhere that I should set my ansi92 parameter to YES instead of NO. But, everytime I re-open my universe, it sets itself automatically to NO again.
    My utlimate goal is :
    For example, list ALL the people, left join my table to their websites, but return ALL the people, even if they don't have a website.
    I dont' understand, my join should be simple enough.
    Anybody knows what could be causing all these restrictions ?
    Thanks for you help.
    Edited by: Sose Canadian on Feb 9, 2009 9:40 PM

    Hi Sose,
    In BusinessObjects (Universe) Designer, the outer join option in a join is not available and is dimmed when using a Generic ODBC connection.
    Try Following Solutions:
    Solution : 1
    When using an ODBC connection the odbc.prm must be modified on the machine where BusinessObjects Designer is used.
    Use the following steps to modify odbc.prm:
    1. Locate odbc.prm in the following folder:
    \Business Objects\Business Objects Enterprise 11\win32_x86\dataAccess\Connection Server\odbc
    2. Open odbc.prm in a text editor and modify the parameter 'EXT_JOIN' so its value is 'YES' instead of 'NO'.The outer join option is now available in BusinessObjects Designer.
    If the outer join option is still not available after following the steps above. open odbc.prm in a text editor and modify the parameter OUTERJOINS_GENERATION. Change its value from 'NO' to either 'ANSI92' or 'ODBC'.
    Solution : 2
    This can occur when user is using a non-database specific middleware such as generic ODBC. Generic ODBC allows creating a successful connection and universe, however will not allow the Outer Join option.
    The syntax for outer joins is specific to each database and the Generic ODBC driver only lets you access standard common features of all ODBC data sources.
    Ensure that you are using the database specific middleware to create the connection.
    I Hope this Helpsu2026.
    Thanksu2026.
    Pratik

  • 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

  • Syntax error while creating Derieved table in universe

    Hi Guru,s
    I really need help here.
    I am trying to create relational universe based on oracle 10g and while creating one of the derieved table when I am writing a SQL sysntax it gives me an Invalid prompt defination error , first of all here is the SQL syntax"
    SELECT
      ITEM.ID,
      ITEM.AMOUNT,
      ITEM.POSTEDORISSUE
    FROM
      ACCOUNT,
      ITEM,
      ITEMTYPES,
      ACCOUNTPOOL,
      COMPANY
    WHERE
      ( ACCOUNT.COMPANYID=COMPANY.ID  )
      AND  ( ACCOUNT.POOLID=ACCOUNTPOOL.ID  )
      AND  ( ACCOUNT.ID=ITEM.ACCOUNTID  )
      AND  ( ITEMTYPES.ID=ITEM.DCIP  )
      AND
       COMPANY.NAME  =  'MLC BA Cat Accounting PRD1'
       AND
       ITEM.POSTEDORISSUE  BETWEEN  @Prompt('Start Date','D','Date\Post Date',mono,free,persistent,{'01-10-2011 00:00:00'},'1')  AND  @Prompt('End Date','D','Date\Post Date',mono,free,persistent,{'01-10-2011 00:00:00'},'2')
    Now thw error I get is that when I trying to parse or validate the query.
    "Invalid Prompt defination" (WIS 00005)
    Seems like its not validating the query through database.
    I have checked the prompt sysntax and nothing seems to be wrong, Can anyone pls look into this and advise what am I doing wrong interms of syntax, I would really appreciate your help.
    Regards.
    MD

    Hi,
    I am getting the correct results, when i can use like below
    @prompt('Enter Product Equal','A',{'TTTT','YYYYY','oooo'},Mono,Constrained,Persistent,User:1,Optional)
    @prompt('Enter Product Not Equal','A',{'TTTT','YYYYY','oooo'},Mono,Constrained,Persistent,User:2,Optional)
    If i can start using like below, not getting the correct results, Any suggestion why?
    @prompt('Enter Product Equal','A','Table_Name\Product',Mono,Constrained,Persistent,User:1,Optional)
    @prompt('Enter Product Not Equal','A','Table_Name\Product',Mono,Constrained,Persistent,User:2,Optional)
    I am thinking something issue with class name/Object Name  in BI 4.0. In XIR3  I changed the same derived table with class name and object name, it;s working fine.
    Any suggestions/advice please
    Praveen

  • RFC Connection error - Invalid length. Check parameters.

    Hi Forum, Good Morning!
    My ABAP Program will run in BACK Ground Job Processing(SM37) to download data to Presentation server( Local PC Directory). So I have created a RFC destination type TCP/IP to use 'RFC_REMOTE_FILE'  function module in my ABAP Program.
    When I am trying to test RFC connection It is giving following error.
    ERROR   Invalid length. Check parameters
    LOCATION  SAP- Server dsapp05_R3D_10 on host dsapp05 (wp 2)
    COMPONENT   CPIC
    COUNTER   14
    MODULE
    LINE
    RETURN CODE    240
    SUBRC                0
    RELEASE           640
    TIME                   Mon Dec 11 10:08:05  2006
    I did following procedure before I test RFC destination..
    I have created RFC Destination : BJRFC
    Technical Settings: Selected Registered Server Program radio button
    Program ID: BJACCESS
    Gateway host : 172.22.149.199
    gateway Service: sapdp10
    In my local machine Copied  ‘SAPRFC.INI’ file from the TEXT folder to the BIN Folder.
    Then open the SAPRFC.INI file in BIN folder and Register a RFC server program at a SAP Gateway.
    DEST=R3D_R
    TYPE=R
    PROGID=BJACCESS.rfcexec
    GWHOST=172.22.149.199
    GWSERV=sapdp10
    RFC_TRACE=0
    DEST=R3D_R
    TYPE=R
    PROGID=BJACCESS.trfcexec
    GWHOST=172.22.149.199
    GWSERV=sapdp10
    RFC_TRACE=0
    Then entered below command in dos prompt.
    C:\Program Files\SAP\FrontEnd\SAPgui\rfcsdk\bin>rfcexec -aBJACCESS –172.22.149.199 –xsapdp10.
    so how do i proceed in this kind of case.
    any help  please.
    Thanks in advance.

    Hi,
       Just you check whether your program is registered or not.
       If it is registered then you can find in SMGW transaction and go to
       GOTO - Logged on clients
    in that you will be able to see your program name if it registers succesfully.
    you have typed rfcexec -aBJACCESS –172.22.149.199 –xsapdp10
    in this way.
    In this you have misseg 'g' in front of your sap ip.
    Thanks&Regards
    Rajehs Balusu

  • 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

Maybe you are looking for

  • Items Not Seen by a Non-Apple App. After Installation of 10.6.

    This happened since I installed Snow Leopard (OS 10.6) yesterday, so I'm not sure if the bug is in Poser 8 (made by SmithMicro) or the Mac Finder or in some other part of the Snow Leopard OS, or the way they work together. If I go to the Pose Library

  • 429 ActiveX error on Control Tables

    Hi, We just migrated on application into a different FDQM enviromnet. In the workbench, when we open control tables, we get a 429 ActiveX error. Any help will be appreciated..

  • IPad usage by pregnant women?

    Is there any health hazard in using iPad since my wife is pregnant and we use an iPad 2 3G 64?

  • Reading PDF file

    Hi Experts, Could anyone please tell me how to open a PDF file (to call Adobe Reader to display the file) from a specific directory. Thanks in advance. Regards, Tiwa Noitawee. Message was edited by:         Tiwa Noitawee

  • Hi8 to convert , want to but canopus 300? will it work on my mac?

    Hello all hopefully this is in the right place for this question. i have a MBP 2008 mac OS x 10.5.8- 15 inch 2.4ghz 2duo 2gb 200gb 5400. I want to convert some of our family hi8 tapes to digital format then to burn to DVD. SO here goes the questions.