Create and execure a dynamic query

hi all,
i'm trying to write a procedure in order to create a dinamyc query and calculate a certain value.
i coded something like this but it does not work:
create or replace procedure CALCOLA_OPERAZIONE
is
sql_stmt varchar2(2000);
colonna varchar2(2000);
tabella varchar2(2000);
fattore varchar2(2000);
parametro number;
bt number := 0;
cursor cur is
select cod_colonna,cod_tabella,fattore_bt from table;
begin
open cur;
    loop
        fetch cur into colonna,tabella,fattore;
        sql_stmt := 'select :1 * :2 into parametro from :3';
        EXECUTE IMMEDIATE sql_stmt USING colonna,fattore,tabella;
        bt:=bt+parametro;
    end loop;
close cur;
EXCEPTION
WHEN OTHERS THEN
      raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
end;here the error i get:
An error was encountered - -903 -ERROR- ORA-00903: invalid table namecan anyone help me?
Edited by: 908335 on 6-feb-2012 1.30

The good news is that what you want to do should be possible, but you need to take a different approach.
The bad news is that I agree with the others and think you need to take a step back and think about whether this is a good design. Dynamic SQL is a difficult solultion to implement and (within reason) static sql is almost always more maintaintable.
Still, if you're doing this as an exercise for your own knowledge or an assignment the technique is something like what I will put below (it will be untested). You will need to build the sql as text, execute it, and get the results. I prefer reference cursors for this kind of work although EXECUTE IMMEDIATE can be used. The solution will look something like (beware typos)
declare
  ref_cursor sys_refcursor;
  col           varchar2(32767);
  sql_text    varchar2(32767);
  value       varchar2(1);
begin
  col := 'dummy';
  sql_text := 'select '||col||' from dual';
  open ref_cursor using sql_text;
  fetch ref_cursor into value;
  close ref_cursor;
end;I will leave it up to you to figure out how to adapt what you have to work like this :)

Similar Messages

  • Syntax of creating and calling a stored query in Ms Access

    What is the syntax of creating and calling a stored query via a java program

    Google found this:
    http://www.quepublishing.com/articles/article.asp?p=170870 It has some examples about how to call a stored procedure. Not for Access, though - if you have questions about that, ask Microsoft.

  • Creating and filling JTables dynamically

    Hello,
    How can I create and display a JTable dynamically in a Java application? In my application, I retrieve rows from a database and therefore I don't know in advance how many rows I need for my JTable (using the tablemodel). I tried to solve the problem in the following way:
    1)start op applicatie with a JTable with 0 rows (screen is grey, only columns are visible)
    2)run query and count number of rows.
    3)create new JTable based on number retrieved in step 2 and tried to put it onto the screen.
    4)run query again and fill table with values retrieved from query
    The bottleneck so far is step 3. I can create a new table but I don't manage to put it onto the screen (i tried already the repaint() method)
    Thanx for you help
    Frits

    Sure, no problem. Assume you've retrieved the following result from the database:First Name     Last Name     Age
    John           Doe           25
    Jane           Doe           27
    Joe            Smith         40
    Mary           Smith         19You create your JTable as like this:Vector headings = new Vector();
    Vector rows = new Vector();
    Vector cells = null;
    JTable table = null;
    for(int x=0; x< resultSize; x++){//resultSize is the size of your result
      cells = new Vector(); //Cells together will represent a row
      cells.add(yourResult.getTheFirstColumnForRowX()); //Pseudo-code
      cells.add(yourResult.getTheSecondColumnForRowX()); //Pseudo-code
      cells.add(yourResult.getTheThirdColumnForRowX()); //Pseudo-code
      //Now place those cells into the rows vector
      rows.add(cells);
    //Create the JTable
    table = new JTable(rows, headings);This code is not tested and is meant to give you an idea of how the concept can be applied. Hope it helps.

  • Create table problem using Dynamic Query

    Hi all,
    I want to create a temporary table within a stored procedure so I decided to do it using a dynamic query:
    create or replace procedure p1
    as
    begin
    execute immediate 'CREATE GLOBAL TEMPORARY TABLE tt(id number(2))';
    end;
    / It created successfuly but when I execute that procedure I got:SQL> exec p1;
    BEGIN p1; END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SCOTT.P1", line 4
    ORA-06512: at line 1 While I can create that table using the same user without any problem!
    My question is:What privilege should I grant to user(minimum of privileges please! ) to execute that procedure successfuly?
    -Thanks

    Hi,
    To say a little bit more about Nicolas' answer:
    SQL> grant create table to scott;
    This is the right answer, but you might wonder why you have to do so if you usually can create tables with this user..
    11:59:19 TEST.SQL>CREATE USER UTEST
    11:59:28   2  IDENTIFIED BY UTEST;
    User created.
    11:59:35 TEST.SQL>CREATE ROLE RTEST;
    Role created.
    11:59:40 TEST.SQL>GRANT RTEST TO UTEST;
    Grant succeeded.
    11:59:45 TEST.SQL>GRANT CREATE SESSION TO RTEST;
    Grant succeeded.
    11:59:54 TEST.SQL>GRANT CREATE TABLE TO RTEST;
    Grant succeeded.
    12:00:03 TEST.SQL>GRANT UNLIMITED TABLESPACE TO UTEST;
    Grant succeeded.
    12:00:17 TEST.SQL>CREATE PROCEDURE UTEST.CT_TEST
    12:00:32   2  IS
    12:00:33   3  BEGIN
    12:00:35   4  EXECUTE IMMEDIATE 'CREATE TABLE UTEST.TTEST (A NUMBER)';
    12:00:56   5  END;
    12:00:58   6  /
    Procedure created.
    12:00:59 TEST.SQL>EXEC UTEST.CT_TEST;
    BEGIN UTEST.CT_TEST; END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "UTEST.CT_TEST", line 4
    ORA-06512: at line 1
    12:01:06 TEST.SQL>GRANT CREATE TABLE TO UTEST;
    Grant succeeded.
    12:01:15 TEST.SQL>EXEC UTEST.CT_TEST;
    PL/SQL procedure successfully completed.Don't forget that when you're using PL/SQL, privileges granted via roles are ignored!
    Regards,
    Yoann.

  • Creating and Accessing a Dynamic View Object

    Hi,
    I'm needing to create a Dynamic View Object so to have the ability to modify the FROM and WHERE clauses in an SQL statement.
    I then need to view all the columns and rows in an adf table or something similar.
    I've read up a fair bit on similar situations, however I'm struggling with the basic framework of building the View Object.
    I know I'm wanting to use ..createViewObjectFromQueryStmt..but just unsure of the syntax in using it, especially connecting the VO to an Application Module.
    This is similar to what I've got now, located in AppModuleImpl.java
        public void createDynVO(ApplicationModule appMod, String FROMclause, String WHEREclause){
        String SQL = "SELECT JOURNAL_NAME, PERIOD_NAME FROM " + FROMclause + " " + WHEREclause;
        ViewObject vo = appMod.createViewObjectFromQueryStmt("DynamicView", SQL);
        vo.executeQuery();But how does it know what the application module is?
    Any help would be greatly appreciated!
    -Chris

    Ok, I've actually modified my approach to this.
    I've created a View Object in the design view, added it to the App Module, and then created an iterator and bound an adf table to that iterator.
    The View Object which I created has the same column names as what I am going to be getting later down the track.
    Everything is working perfectly, except that I can't seem to bind variables to the WHERE clause.
    Below is what I have got running:
        public void recreateDynView(String FromClause, String whereCompany, String whereDepartment) {
             String sql_PAGE_ITEM1 = " AND PAGE_ITEM1 LIKE :P_PAGE_ITEM1";
             String sql_PAGE_ITEM2 = " AND PAGE_ITEM2 LIKE :P_PAGE_ITEM2";
             findViewObject("DynamicView1").remove();
             String SQLStmt = "SELECT PAGE_ITEM1, PAGE_ITEM2, PAGE_ITEM3, LINE_ITEM FROM " + FromClause;
             ViewObject vo = createViewObjectFromQueryStmt("DynamicView1",SQLStmt);
             vo.setWhereClause("1=1");
               if (whereCompany != null && whereCompany.length()>0){
                   vo.setWhereClause(vo.getWhereClause() + sql_PAGE_ITEM1);
                   vo.defineNamedWhereClauseParam("P_PAGE_ITEM1",null,null);
                   vo.setNamedWhereClauseParam("P_PAGE_ITEM1",whereCompany);
               if (whereDepartment != null && whereDepartment.length()>0){
                   vo.setWhereClause(vo.getWhereClause() + sql_PAGE_ITEM2);
                   vo.defineNamedWhereClauseParam("P_PAGE_ITEM2",null,null);
                   vo.setNamedWhereClauseParam("P_PAGE_ITEM2",whereDepartment);
             vo.executeQuery();
           }However whenever I input a value into one of the bound variables, I get the following error on the page.
       1. JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOperException, msg=JBO-25070: Where-clause param variable P_PAGE_ITEM1 needs ordinal index array.
       2. JBO-25070: Where-clause param variable P_PAGE_ITEM1 needs ordinal index array.In the view object which i created at design stage, I've set the binding style to Oracle Named, so it should be alright. But obviously since I'm removing the view object and creating another version of it, it doesn't have the same binding style attached by default?
    Is there a work around for this? I'm so close!
    -Chris

  • Can Power Users or Mgt Create and Design Reports Through Query Designer ?

    Dear BI consultants,
    Iam new to BI.
    My management has requested me to Train Power users from All Modules(FICO,HR,QM,PP,SD,MM) to Create Queries and Design Through Query Designer.
    My question is are we suppose to Give query Designer Access to Power users or Mgt so that they can create Queries and reports by themselves.Please Suggest me wht is the Best Practices.
    is it feasable to train power users and Mgt as to how 2 create queries. will there be any side effect on the System or our end.
    Plz suggest.
    wht are the advantages and disadvantages of this.
    If I train the Power users then is there any risk of my Job.
    since they will be creating all reports by themselves.
    wht else can a BI consultant do since iam in a support project.
    how do i convince my Mgt?
    Plz Suggest.
    Thanks Awaiting

    This is common procedure maintained in most of the company's for end users.
    There is no issue if you train the power users.you will be the first point of contact if they have any doubts.and more over you are supporting for your client right? this can't be handed over to power user or end user. data is imp for the client so there will not be any problem for you, if any issue comes while loading you need to take care of the errors and fix the.
    power users or end user will be familiar with Business requirement not with the Query building logic's not with the BW procedure so no worries for you.
    as vineeth said its better to keep control regarding the global and key things at your end so that you will not loose contol on the reports.

  • Create and Load Chart dynamically  in Flex

    Hi Friends,
    I want to create the chart dynamically [N numbers] . I try
    to create one line chart and add line series by action script , but
    i stuck up at how to embed that chart object in mxml code. I want
    to load the [action script created ] chart in canvas container.
    Plz help me if u have any ideas ,
    thanks
    ksam.

    what i would like to have is like this...
    XML Template :
    <class name="TaskA" getters="true" setters="true">
    <properties name="id" type="java.lang.Long" defaultValue="0"/>
    <properties name="name" type="java.lang.String" defaultValue="null"/>
    <properties name="priority" type="java.lang.Integer" defaultValue="3"/>
    </class>
    And using some java code i could generate a class at runtime, the prototype of which would be something like this...
    public class TaskA {
    java.lang.Long id=0;
    java.lang.String=null;
    java.lang.Integer priority=3;
    ..................... //Getters and Setters of the properties.
    }

  • Creating and deleting symbols dynamically

    I need help with getting this particular function implemented.
    I have 2 buttons with codes which I've added
    //Create button
    $.getJSON("content.JSON")
      .success(
      function(data){
      console.log("incoming data: ", data);
      //console.log("this is current value of var s", template);
      if (s == null)
      $.each(data, function(index, item){
      //var s = sym.createChildSymbol( "template", "content");
      s = sym.createChildSymbol( "template", "content" );
      // Creating the variable that save my new instance of mySymbol
      sym.setVariable("itemContainer"+i, s);
      console.log("item container name", s);
      s.$("title").html( item.item );
      s.$("description").html( item.description );
      s.play(index * -500);
      i++;
      //console.log("'dressbtn' inside was CLICKED");
      else
    //Delete button
    for(var p = 1; p <= i; p++)
    s = sym.getVariable("itemContainer"+p);
    s.deleteSymbol();
    i = 1;
    So the two buttons one will get the items from Json and display them, and the other will clear the symbols created.
    But I've only managed to clear the symbols on stage only once, and after that I'm getting Javascript error in event handler! Event Type = element
    The reason is because I'm trying to make an app that can get information off a json file from a webserver and able to update and display the lastest information in the app. So I've to be able to allow the user to press a button to refresh the page.
    Can anyone shine some light on this?
    Dropbox - test.zip

    Hi,
    Your issues (or troubles) come from your json file. Your json file is not well formed.
    Here is a correct one:
    {"shoes":[
    {"item":"red shoe","description":"prada red shoe"},
    {"item":"black shoe","description":"Black canvas shoe"},
    {"item":"tilith shoe","description":"tilith ballet shoe"},
    {"item":"gold shoe","description":"gold ballet shoe"},
    {"item":"ganma shoe","description":"ganma canvas shoe"}
    Then your buttons code:
    1) mybtn.click:
    //get json information and display
    $.getJSON("content.JSON")
      .success( function(data){
      console.log("incoming data: ", data);
      $.each( data.shoes, function(index, item){
      var s = sym.createChildSymbol( "template", "content");
      s.$("title").html( item.item );
      s.$("description").html( item.description );
      s.play(index * -500);
      } );//each
       } );//success
    2) btn_2.click:
    //deleting shoes (symbols)
    var symbols = sym.getChildSymbols();
    $.each(symbols, function(index, item){
      console.log("symbols on stage: ",item.getSymbolTypeName());
      if (item.getSymbolTypeName() == "template") item.deleteSymbol();
    Download link: test-2 - copie.zip - Box

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Dynamic Query to display a page of records at a time

    I need some help creating procedure with a dynamic query that will query a table and pass out a certain number of records (like records 101 - 200 of 20,000). This procedure will receive the column names, table name, where clause, page number and number of records per page. It will then pass back the requested records to be displayed on a PHP page.
    Pseudo Code:
    Select Dynamic_Columns, ROWNUM
    Into Dynamic_Pl_Sql_Table
    From Dynamic_Table
    Where Dynamic_Where_Clause
    Total_Records_Out := Dynamic_PL_Sql_Table.Count
    Modulus := Mod(Total_Records_Out, Total_Records_Per_Page_In)
    Total_Pages_Out := (Total_Records_Out - Modulus) / Total_Records_Per_Page_In
    If Modulus > 0 Then
    Total_Pages_Out + 1
    End If
    Row_Start = Page_Number_In * Total_Records_Per_Page_In
    Row_End = Row_Start + Total_Records_Per_Page_In
    Results_Out = Dynamic_Pl_Sql_Table(Row_Start ... Row_End)
    Any help with this will be appreciated!

    Maybe this will help you
    1) If the Serial is 0 then page break
    2) total_rows gives you total number of rows selected.
    3) you can apply where clause to this and it will give you appropriate records.
    select empno, ename, sal, 
    mod(row_number() over (order by null),5) serial,
    count(*) over () tot_rows from emp ed
         EMPNO ENAME             SAL     SERIAL   TOT_ROWS
          7369 SMITH             800          1         14
          7499 ALLEN            1600          2         14
          7521 WARD             1250          3         14
          7566 JONES            2975          4         14
          7654 MARTIN           1250          0         14
          7698 BLAKE            2850          1         14
          7934 MILLER           1300          2         14
          7788 SCOTT            3000          3         14
          7839 KING             5000          4         14
          7844 TURNER           1500          0         14
          7876 ADAMS            1100          1         14
          7900 JAMES             950          2         14
          7902 FORD             3000          3         14
          7782 CLARK            2450          4         14
    14 rows selected.SS

  • Returning a result set/record from a dynamic query

    There seems to be plenty of examples for using Native Dynamic Sql to formulate and execute a dynamic query, however there are no examples of returning a result set or records which contain the rows of data that are retrieved by executing the query. Could someone give us an example?

    Welcome to the Oracle forum....
    CREATE OR REPLACE PACKAGE curspkg_join AS
    TYPE t_cursor IS REF CURSOR ;
    Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor);
    END curspkg_join;
    Create the following Oracle package body on the Oracle server:
    CREATE OR REPLACE PACKAGE BODY curspkg_join AS
    Procedure open_join_cursor1 (n_EMPNO IN NUMBER, io_cursor IN OUT t_cursor)
    IS
    v_cursor t_cursor;
    BEGIN
    IF n_EMPNO <> 0
    THEN
    OPEN v_cursor FOR
    SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
    FROM EMP, DEPT
    WHERE EMP.DEPTNO = DEPT.DEPTNO
    AND EMP.EMPNO = n_EMPNO;
    ELSE
    OPEN v_cursor FOR
    SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME
    FROM EMP, DEPT
    WHERE EMP.DEPTNO = DEPT.DEPTNO;
    END IF;
    io_cursor := v_cursor;
    END open_join_cursor1;
    END curspkg_join;
    Dim Oraclecon As New OracleConnection("Password=pwd;" & _
    "User ID=uid;Data Source=MyOracle;")
    Oraclecon.Open()
    Dim myCMD As New OracleCommand()
    myCMD.Connection = Oraclecon
    myCMD.CommandText = "curspkg_join.open_join_cursor1"
    myCMD.CommandType = CommandType.StoredProcedure
    myCMD.Parameters.Add(New OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output
    myCMD.Parameters.Add("n_Empno", OracleType.Number, 4).Value = 123
    Dim myReader As OracleDataReader
    Try
    myCMD.ExecuteNonQuery()
    Catch myex As Exception
    MsgBox(myex.Message)
    End Try
    myReader = myCMD.Parameters("io_cursor").Value
    Dim x, count As Integer
    count = 0
    Do While myReader.Read()
    For x = 0 To myReader.FieldCount - 1
    Console.Write(myReader(x) & " ")
    Next
    Console.WriteLine()
    count += 1
    Loop
    MsgBox(count & " Rows Returned.")
    myReader.Close()
    Oraclecon.Close()
    The above code is working in one of our application; which is using ref cursor as result set and get from procedure. I hope you can found more code by google and/or search in this forum as well; if above code is not useful to you.
    HTH
    Girish Sharma

  • SAP MII 14.0 SP5 Patch 11 - Error has occurred while processing data stream Dynamic Query role is not assigned to the Data Server

    Hello All,
    We are using a two tier architecture.
    Our Corp server calls the refinery server.
    Our CORP MII server uses user id abc_user to connect to the refinery data server.
    The user id abc_user has the SAP_xMII_Dynamic_Query role.
    The data server also has the checkbox for allow dynamic query enabled.
    But we are still getting the following error
    Error has occurred while processing data stream
    Dynamic Query role is not assigned to the Data Server; Use query template
    Once we add the SAP_xMII_Dynamic_Query role to the data server everything works fine. Is this feature by design ?
    Thanks,
    Kiran

    Thanks Anushree !!
    I thought that just adding the role to the user and enabling the dynamic query checkbox on the data server should work.
    But we even needed to add the role to the data server.
    Thanks,
    Kiran

  • Display results from dynamic query created and executed inside procedure

    Hi;
    I have created this code:
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, VAR3 IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    end RunDynamicQuery;
    How can I run this procedure and see the result on the dymanic query generated inside it?
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Expected Output for this given example:
    20-05-2009 11:04:44 ( the result of the dymanic query inside the procedure variable MainQuery :='select sysdate from dual';)
    I tested with 'execute immediate':
    CREATE OR REPLACE PROCEDURE RunDynamicQuery(Var1 IN VARCHAR2, Var2 IN VARCHAR2, filter IN VARCHAR2) AS
    -- Do something
    -- That ends up with a variable holding a query.... (just an example)
    MainQuery :='select sysdate from dual';
    execute immediate (MainQuery );
    end RunDynamicQuery;
    BEGIN
    compare_tables_content('VAR1','VAR2','VAR3');
    END;
    Output:"Statement processed'' (no sysdate displayed ! )
    Please consider that the collums in the query are always dynamic... PIPELINE Table would not work because I would need to define a container, example:
    CREATE OR REPLACE TYPE emp_tabtype AS TABLE OF emp_type;
    FUNCTION RunDynamicQuery (p_cursor IN sys_refcursor)
    RETURN emp_tabtype PIPELINED
    IS
    emp_in emp%ROWTYPE;
    BEGIN
    LOOP
    FETCH p_cursor
    INTO emp_in;
    EXIT WHEN p_cursor%NOTFOUND;
    PIPE ROW (...)

    That would be a nice solution, thanks :)
    ''For now'' I implemented like this:
    My dynamic query now returns a single string ( select col1 || col2 || col3 from bla)
    This way I don't have dynamic collumns issue, and from business side, this ''string'' format works for them.
    This way I can use the pipelines to get the result out...
    OPEN myCursor FOR MainQuery;
    FETCH myCursor
    INTO myRow;
    WHILE (NOT myCursor%notFound) LOOP
    PIPE ROW(myRow);
    FETCH myCursor
    INTO myRow;
    END LOOP;
    CLOSE myCursor;

  • Create a dynamic query with or/and

    Hello!
    Please help to accomplish the following:
    User needs to create a dynamic query.
    There are few select lists: sex, race, state …
    User selects whatever he needs from select lists, which would become the first part of the “where clause” – i.e. (sex = ‘M’ AND state = ‘NY’).
    Then the user wants to add an additional condition using “OR/AND” – i.e. i.e. (sex = ‘M’ AND state = ‘NY’) OR (sex = ‘F’).
    I have been able to build the first clause and pass to a variable. I need to be able to clear the values in the select lists, but keep the value stored in the variable, and then append each new clause to the variable. This needs to be event driven by an item on the page.
    Any help is appreciated.
    Thank you in advance.

    Hi,
    At that point my application works fine.
    But I need to add ability to clear select lists and enter a new condition with 'OR'
    operator.
    The final SQL statement should look:
    select employee_id, name from employee_v where (sex = ‘M’ AND state = ‘NY’) OR (sex = ‘F’)
    Thank you.

  • How to create an LOV based on a dynamic query

    Hi,
    Can someone tell me how to query a dynamic query for LOV. On my base page I have a dropdown-box (that will show the table names for searching) and is dynamically populated based on users access e.g. if user A logs in he may see 5 values (these values are basically table names) in a drop down if user B logs in he may see 10 values. I also have two input fields one field a user can enter value and the other field is read only and a torch icon for LOV so the user can search and select values that are populated in the input fields on the base page.
    How can I have my LOV that takes in a value selected in the dropdown and anyvalue entered in one of the input fields and search in the table selected in the dropdown box.
    Basically my LOV should do a search on the table and some search value passed when clicking on the torch icon. So a user can select any table-name in the drop down and my LOV should do a search only on the selected table. Once on the LOV Popup want to have a search field there but it only searched on the table selected in the dropdown on the based page. And the selected value on the LOV Popup page gets populated in fields on the base page.
    Any help is appreciated.
    Thanks

    Hi,
    I have created 4 SQL Based VO's with the following sqls
    SELECT header_id AS ID, to_char(order_number) AS NAME
      FROM oe_order_headers_all
    SELECT party_id AS ID, party_name AS NAME
      FROM hz_parties
    SELECT quote_header_id AS ID,
           (quote_number || CHR (45) || quote_version) AS NAME
      FROM aso_quote_headers
    SELECT sales_lead_id AS ID, to_char(lead_number) AS NAME
      FROM as_sales_leadsI created on LOVRegin and have the following 2 messagestyle items now what do I set in the ViewInstance and View Attribute fields
    srcid
    srcname
    Can you provide some sample code to set ViewUsage and whereclause that I need to put in the controller of LOVRegion.
    Thanks

Maybe you are looking for