How to use @prompt for stored procedure in universe

Hi,
I am using Bo XI R3.1 and universe was built on stored procedures and database is sql server 2005.
I would like to show the list of values for prompts in report which they are based on parameters given for stored procedures in universe. Instead of typing the value for prompts the user should select some values for the prompt.
I've tried in the universe putting the prompt syntax but didn't work could any one please let me know how this will be achived
Thanks in advance,
Eswar

Hi Eswar,
Please try the following steps mentioned below:
1. Go to Insert -> click Tables and Import the table which needs to assign LOVu2019s into Universe panel.
Objects which are created on tables may appear in inactive mode.
2. Right click on the stored procedure -> Click on Edit stored procedures.
3. Click on the Browse universe objects from Stored Procedure Editor. (Button avaial on the left)
4. Select the object which you want to assign for the List of values.
5. Enter the desired text which you want to display in the WebI reports in the Edit prompt Label.
6. Export the Universe.
Before doing the above steps:
While creating for SP Univ, a parameter screen appears after selecting SP. In the "Value" field enter a dummy value and
from the "Next Execution" drop down at the right select "Prompt me for a value".
Regards,
Rohit

Similar Messages

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • How to use &APP_ID. inside stored procedure.

    Hello, I have created one stored procedure. I am calling it from my process code. I want to use so many page variables like &APP_ID. I do not want to pass it as argument. Is it possible to use those variables without passing it in to procedure.? (&page_id. and also some application level variables )
    Any help is appreciated.
    Thank you.

    Ashif:
    The APEX documentation describes in detail the various ways of referencing APEX session state.
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/concept.htm#BEICHBBG
    Local variables declared in your process block are not available in APEX' session state. Hence you cannot refence such variables in a stored procedure.
    Varad

  • How to use arrays in stored procedure??Please do help me.......

    hi, i need to make a procedure where i may execute a query.The query returns multiple rows.Now i want to use 1 row.i needs to fetch all colums as out parameter...can anyone please help me.....i will be very thankful to the person.

    you cannot just force only one column from a select statement to be a out parameter, you need to collect all the columns into a collection type and use the collection type as out parameter or use refcursor as out parameter and fetch the rows
    using collection type
    create type obj_typ is object(
    a_val number,
    b_val varchar2(100)
    create type nest_typ is table of obj_typ
    create or replace procedure retrieve_emp(mgr_no number,e_details out nest_typ) is
    begin
    select obj_typ(empno,ename) bulk collect into e_details from emp
    where mgr = mgr_no;
    end;
    declare
    nest_var nest_typ;
    begin
    retrieve_emp(7698,nest_var);
    for i in 1..nest_var.count loop
    dbms_output.put_line(nest_var(i).a_val || ' - '||nest_var(i).b_val);
    end loop;
    end;
    7499 - ALLEN
    7521 - WARD
    7654 - MARTIN
    7844 - TURNER
    7900 - JAMESUsing ref cursor
    create or replace procedure retrieve_emp2(mgr_no number,e_details out sys_refcursor) is
    begin
    OPEN e_details FOR select empno,ename from emp
    where mgr = mgr_no;
    end;
    declare
    empno_val emp.empno%type;
    ename_val emp.ename%type;
    edetails_ref_Cur sys_refcursor;
    begin
    retrieve_emp2(7698,edetails_ref_Cur);
    loop
    fetch edetails_ref_cur into empno_val,ename_val;
    exit when edetails_ref_cur%notfound;
    dbms_output.put_line(empno_val ||' - '||ename_val);
    end loop;
    close edetails_ref_cur;
    end;
    7499 - ALLEN
    7521 - WARD
    7654 - MARTIN
    7844 - TURNER
    7900 - JAMESHTH,
    Prazy

  • How to customize events, execute stored procedures using JSF and ADF BC

    As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
    Edited by: 792068 on Aug 31, 2010 9:40 PM

    Which business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
    which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer?

  • How to find the columns and tables used in a stored procedure?

    Hi,
    Can someone suggest how to find the columns and tables used within a stored procedure?
    Thanks
    VBK

    For example:
    SQL> create or replace
      2    procedure p1
      3      is
      4          cnt number;
      5      begin
      6          select count(*) into cnt from emp;
      7  end;
      8  /
    Procedure created.
    SQL> select  referenced_owner,
      2          referenced_name
      3    from  dba_dependencies
      4    where owner = 'SCOTT'
      5      and name = 'P1'
      6      and referenced_type = 'TABLE'
      7  /
    REFERENCED_OWNER               REFERENCED_NAME
    SCOTT                          EMP
    SQL> SY.

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Find all tables used in a stored procedure

    Hi,
    I have a requirement where i have to find all the tables used in a stored procedures from different  databases.
    Ex: i have a stored procedure where i use few tables from MASTER database and some from STAGE database.When i have written a query to find all tables used in the stored procedure, i am getting only those database table where i run the query and procedure
    exists.
    I have stored procedure SP1 in Master database, but i use the tables from both master and stage.
    When i run this, i am getting the tables only from Master database but not from stage. i hope my requirement is clear.
    I am trying to find all the tables from all databases used by a stored proc.
    ;WITH stored_procedures AS (
    SELECT 
    o.name AS proc_name, oo.name AS table_name,
    ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
    FROM sysdepends d 
    INNER JOIN sysobjects o ON o.id=d.id
    INNER JOIN sysobjects oo ON oo.id=d.depid
    WHERE o.xtype = 'P')
    SELECT proc_name, table_name FROM stored_procedures
    WHERE row = 1
    ORDER BY proc_name
    Please advice

    Your question is not entirely clear. You need to run the query on different databases.
    You may find this blog post helpful
    How to get information about all databases without a loop
    Check the last script in that blog post and modify to your particular purpose.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to list dependencies of stored procedure in a package in oracle

    hi gurus,
    can any body help me to solve the below issue?
    how to list dependencies of stored procedure in a package in oracle?
    advanced thanks...

    It sounds like you're going to have trouble because you're trying to track dependencies at a more fine-grained level than Oracle does (at least prior to 11g, which I know does finer-grained dependency tracking for columns, so there may be something that would help you there).
    In Oracle, the entity is the package body. The procedure within the package does not have dependencies and does not depend on anything, it is part of the package body, which does have dependencies. You can see what tables are used by the package body via DBA_DEPENDENCIES. But if you're trying to track the dependencies for a particular procedure in a package, you'd either have to manually examine the code or you'd have to write your own PL/SQL parser.
    Justin

  • Too many arguments for stored procedure call

    I have a stored procedure with 34 arguments, including the return value. I am trying to call it from java using JDBC thin drivers (jdk11, oracle815), but I get the "wrong number or types of arguments" error message. JDBC-OCI fails also. I saw a reference in this discussion group to there being a limit of 32 arguments for stored procedure calls from jdbc (posted 6/29/99). Is there such a limit? If so, is there a fix or workaround? If there is not a limit, how can I determine which argument is causing the problem?
    Many thanks.
    Mike
    java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'PUT_CHECK'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
    a)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement
    .java)
    at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
    nt.java)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
    edStatement.java)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
    ement.java)
    at metris.quickcheck.database.DS1.main(DS1.java:79)
    null

    I must confess I still don't understand your problem. By rows ...
    I have an sql that recodes a column and has 1450 rows. This doesn't work
    although when I use the same with less rows 40-60 it works.... do you mean rows in the table or elements in the CASE() statement ?
    From the 9i SQL Reference:
    " The maximum number of arguments in a CASE expression is 255, and each WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices, you can nest CASE expressions. That is return_expr can itself be a CASE expression."
    According to the 10g docs the limit is the same there.
    Cheers, APC

  • Database updation using XML and stored Procedure?

    Hello,
    I want to perform updation in multiple tables using XML files.Please suggest can I do updation using xml and stored procedure.
    If yes then which is more efficient and takes less time.
    1.Updation using xml files only
    2.Updation using xml files with stored procedure.
    3.Stored procedure alone.
    If direct xml and stored procedure communication is possible.then please write how.
    Thanks in advance for any help.

    Here's a sample. The next code drop of the XSQL Servlet will make the easy-to-do from within XSQL Pages:
    package package1;
    import org.w3c.dom.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Class1 extends Object {
    public static void main( String[] arg ) throws Exception {
    Connection conn = getConnection();
    CallableStatement ocs = conn.prepareCall("begin ? := App.HotItems('PAUL'); end;");
    ocs.registerOutParameter(1,OracleTypes.CURSOR);
    ocs.execute();
    ResultSet rs = ((OracleCallableStatement)ocs).getCursor(1);
    OracleXMLQuery oxq = new OracleXMLQuery(conn,rs);
    System.out.println(oxq.getXMLString());
    oxq.close();
    rs.close();
    ocs.close();
    conn.close();
    public static Connection getConnection() throws Exception {
    String username = "scott";
    String password = "tiger";
    String dburl = "jdbc:oracle:thin:@localhost:1521:xml";
    String driverClass = "oracle.jdbc.driver.OracleDriver";
    Driver d = (Driver)Class.forName(driverClass).newInstance();
    return DriverManager.getConnection(dburl,username,password);
    null

  • How to create prompt for inline filter?

    HI All. Can anyone plz help me, how to create prompt for inline filter?
    Let me give an examle...
    Suppose I've taken two columns as # of New Invoices and # of Cancelled Invoices
    Now, If I set a date prompt / month prompt, then the "# of cancelled invoices" column will fetch the number of cancelled invoice for that month only, which I have chosen in the prompt. But I want the "# of cancelled invoices" column to fetch data for the month chosen by me in another prompt.
    So, can anyone help me with the sql statement, which will fetch the prompt data (i.e., month / date chosen by the user) automatically and will furnish the result accordingly.
    Thanks.

    To create a column prompt:
    To create a dashboard prompt, use the following sub-procedure.
    Navigate to the Oracle BI Enterprise Edition Home page, locate the global header, hover the mouse pointer over the New menu to access the menu, and select Dashboard Prompt. From the Select Subject Area menu, select the subject area for which you want to create a prompt. The "Definition pane" is displayed.
    Click the New toolbar button in the Definition Pane to access the prompt type selection list. From the list, select Column Prompt. The "Select Column dialog" is displayed.
    Select a column and click OK. The "New Prompt dialog" displays. If your repository is configured for double columns, then ensure that you select the correct display column. For information on double columns, see "Understanding the Double Column Feature".
    The number of columns that you include in a prompt can affect performance. In general, you should limit the number of columns to as few as possible.
    If you are creating a dashboard prompt and want to add or remove related subject areas, then click the Select subject area button in the "Select Column dialog" to display the "Add/Remove Subject Areas dialog".
    To create an inline prompt, use the following sub-procedure.
    Create a new analysis or access an existing analysis for which you want to create a prompt. Click the Prompts tab. The "Definition pane" is displayed.
    Click the New toolbar button in the Definition Pane to access the prompt type selection list. From the list, select Column Prompt. The analysis' selected columns are displayed in the cascading menu that is adjacent to the Column Prompt selection item.
    http://webmastersomesh.com

  • How to Use 'uid' for AD Users Without Domain Name For User Log in OAM

    How to Use 'uid' for synchronized Active Directory (AD) Users into Oracle Internet Directory (OID) Without Domain Name For User Logins in OIDDAS and OAM
    We successfully integrated OAM 11g with EBS R12.1.3 Now all the AD user id's stored in fnd_users table as [email protected]
    How can we remove @abc.com
    We are using OID 11g and OAM 11g
    Found the similar note for OID 10G: How to Use 'uid' for AD Users Without Domain Name For User Logins in OIDDAS and SSO [ID 580480.1]
    We are in OID 11g.
    Any help on this greatly appreciated.

    I couldn't find any reference that could be helpful -- Please log a SR and see if this is supported and if the steps are available.
    Thanks,
    Hussein

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • How to output value from stored procedure

    Hi folks, I need to output the OrderFK from a stored procedure not really sure how to achieve this any help or tips much appreciated.
    Sql code below
    USE [TyreSanner]
    GO
    /****** Object: StoredProcedure [dbo].[AddCustomerDetails] Script Date: 11/12/2014 20:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /***********************Declare variables ***********************/
    /******tblCustomer******/
    @Forename nvarchar(50),
    @Surname nvarchar(50),
    @HouseNo nvarchar(50),
    @CustAddress nvarchar(50),
    @Town nvarchar(50),
    @Postcode nvarchar(50),
    @ContactNo nvarchar(50),
    @EmailAddress nvarchar(50),
    /******tblLink_OrderProduct******/
    @ProductQuantity int,
    @TotalProductSaleCost decimal,
    @ProductFK int,
    @FittingDate date,
    @FittingTime Time
    As
    DECLARE @CustomerFK int;
    DECLARE @OrderFK int;
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSanner].[dbo].[Customer](Forename, Surname, HouseNo, CustAddress, Town, Postcode, ContactNo, EmailAddress)
    VALUES (@Forename,@Surname,@HouseNo,@CustAddress,@Town,@Postcode,@ContactNo,@EmailAddress)
    Set @CustomerFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Order] (CustomerFK)
    VALUES (@CustomerFK)
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime)
    COMMIT TRANSACTION

    Hi brucey54,
    There’re several ways to capture the value from a Stored Procedure. In you scenario, I would suggest 2 options, by an output parameter or by a table variable.
    By an output Parameter, you need to make a little bit modification on your code as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    @Forename nvarchar(50),
    @FittingDate date,
    @FittingTime Time,
    @OrderFK int output
    As
    DECLARE @CustomerFK int;
    --DECLARE @OrderFK int;
    Run the following code, Then @OrderFKvalue holds the value you’d like.
    DECLARE @OrderFKvalue int;
    EXEC AddCustomerDetails(your parameters,@OrderFKvalue output)
    Anyway if you don’t like to add one more parameter, you can get the value by a table variable as well. Please append “SELECT @OrderFK;” to your Procedure as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime);
    SELECT @OrderFK;
    Then you can call the Stored Procedure as below:
    DECLARE @T TABLE (OrderFK INT);
    INSERT @T EXEC AddCustomerDetails(your parameters) ;
    SELECT OrderFK FROM @T;
    There’re more options to achieve your requirement, please see the below link:
    How to Share Data between Stored Procedures
    If you have any question, feel free to let me know.
    Best Regards,
    Eric Zhang

Maybe you are looking for