Creating a record group not via select statement

Normally a record group is created via a select statement
(f.e. Querystr='Select deptno,dname from dept
populate_group_with_query( GroupId, QueryStr )
Is it possible to create it via a package procedure sending a
refcursor / array

FIND_GROUP(groupname);
CREATE_GROUP_FROM_QUERY(groupname, qry);
POPULATE_GROUP_WITH_QUERY(rgid, qry);
Add_Group_Column(...);
Add_Group_Row(...);

Similar Messages

  • Dynamically creating a Record Group based on Previously entered Record Grou

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Hi,
    I know how to dynamically create a record group based on a query and putting the code in When new form instance.
    My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
    For example
    I have a record group with selects a Location,
    when the user selects the Location from a list of values
    the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
    How can I populate the 2nd record group at run-time when I do not know what site the user will select?
    If I simply populate in when new form instance as in location and just select everything, the list of values populates.
    CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
    I have put the code in the Location field in the when-list-changed trigger.
    I am getting this error:
    frm-41337: cannot populate the list from the record group
    here is the code:
    DECLARE
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
         END IF;
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    IF v_status = 0
    THEN -- No Error. Record Group has been Populated.
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp');
    END IF; -- IF NOT ID_NULL(v_recgrp)
    END;thanks for your assistance.

    Hi,
    Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
    -Ammad

  • How to create Static Record group in Oracle Forms??

    Dear All,
    I have the following values V1,V2 to be placed in my list item field during DML operations.
    I have an example to create the record group based on the table; whereas i have never tried for static value creation.
    Could you please guide me how can i acheive this.?
    Thanks ....
    Regards,
    Sunil.G

    Thanks dhivya for your reply.
    Actually what happens is; when i use the same methodology as you mentioned, it is asking me to set the Initial value.
    Whereas in my applications; user has to manually select any of the values i.e eithe V1 or V2 for the first time.
    Moreover i have found the query:-
    I have created a static record group RG_VERSIONS i.e creating a new record group with the static values mentioning the "Column names " as "Version_label" which i have given the column values as "V1" and "V2" and then another column name as "Version_value" with the column values as "V1" and "V2".
    Then i used the below query in the WHEN-NEW-FORM-INSTANCE trigger:-
    PROCEDURE p_when_new_form_instance
    IS
    l_rg_id recordgroup;
    l_item_id item;
    BEGIN
    --Populating value for  Version Type based on static record group
    l_rg_id := FIND_GROUP ('RG_VERSION');
    IF NOT ID_NULL (l_rg_id)
    THEN
    l_item_id := FIND_ITEM ('BLOCKNAME.COLUMN_NAME');
    POPULATE_LIST (l_item_id, l_rg_id);
    END IF;
    END p_when_new_form_instance;
    Then it was working fine.
    Thanks for your time.
    Regards,
    Sunil.G
    Edited by: Sunil G on Jun 27, 2010 6:00 AM

  • Error message:FRM-12001: Cannot Create the record group(check your query)

    Requirement: Need to get employee name and number in the LOV in search criteria.
    So I created LOV "full_name" and Record group Query under Employee Name property palette with
    select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number
    from apps.per_all_people_f papf, apps.per_person_types ppt
    where sysdate between papf.effective_start_date and papf.effective_end_date AND papf.person_type_id=ppt.person_type_id AND ppt.system_person_type IN ('EMP', 'OTHER', 'CWK','EMP_APL')
    AND PPT.default_flag='Y' and papf.BUSINESS_GROUP_ID=1
    order by papf.full_name
    I was unable to save and getting error message "FRM-12001: Cannot Create the record group(check your query)".
    I cant use PER_ALL_PEOPLE_F.FULL_NAME since full name here is last_name||title||middle_names||firstname.
    But my requiremnet is papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name .
    Can any one of you help me.

    First, Magoo wrote:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    for l_rec in ( select decode ( p_title, null, null, p_title || ' ' ) ||
    p_last_name || ', ' || p_first_name ||
    decode ( p_mid_names, null, null, ' ' || p_mid_names ) full_name
    from dual ) loop
    return ( l_rec.full_name );
    end loop;
    end;</font></pre>
    Magoo, you don't ever need to use Select from Dual. And the loop is completely unnecessary, since Dual always returns only one record. This would be much simpler:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">create or replace function emp_full_name
    ( p_title in varchar2,
    p_last_name in varchar2,
    p_first_name in varchar2,
    p_mid_names in varchar2 ) return varchar2 is
    begin
    Return ( Ltrim( Rtrim ( p_title
    ||' ' ||p_last_name
    ||', '||p_first_name
    ||' ' ||p_middle_names )));
    end;</font></pre>
    And second:
    user606106, you did not mention how you got your record group working. However, you DO have an issue with spaces. If you change this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select papf.title||' '||papf.last_name||', '||papf.first_name||' '||papf.middle_names emp_full_name
    ,papf.employee_number </font></pre>
    to this:
    <pre><font face = "Lucida Console, Courier New, Courier, Fixed" size = "1" color = "navy">select Ltrim(Rtrim(papf.title||' '||papf.last_name||', '
    ||papf.first_name||' '||papf.middle_names)) AS emp_full_name,
    papf.employee_number</font></pre>
    it should work. The Ltrim(Rtrim()) removes leading and trailing spaces from the resulting full name.

  • How to create a cursor on a union select statement?

    Hi,
    Using Oracle 10g RAC +ASM ( RELEASE 1002000300)
    What are is the proper way to create a cursor on a union select statement?
    Is it possible?
    code lines, Results in PLS-00201 error: sT := crsR.STATUS; sS := crsR.TIME;
    Procedure listed below:
    CREATE OR REPLACE PROCEDURE BUILD_SUMMARY IS
    CURSOR csrO IS
    SELECT
    STATUS,
    TIME
    FROM (
    SELECT
    SUBSTR(DESCRIPTION,1,50) STATUS,
    TO_CHAR(TIMESTAMP,'MM/DD/YY hh12:mi:ss') TIME
    FROM GLOBALSALES.CUBE_STATUS
    UNION ALL
    SELECT
    ' TOTAL BUILD TIME',
    TO_CHAR(TO_DATE('00:00:00','HH24:MI:SS') +(MAX(TIMESTAMP) - MIN(TIMESTAMP)), 'HH24:MI:SS')
    FROM GLOBALSALES.CUBE_STATUS);
    csrR csrO%ROWTYPE;
    sT LONG :='';
    sS LONG :='';
    BEGIN
    FOR csrR IN csrO
    LOOP
    sT := crsR.STATUS;
    sS := crsR.TIME;
    DBMS_OUTPUT.PUT_LINE(sT || ' ' || sS);
    END LOOP;
    END;
    /

    csrR csrO%ROWTYPE;
    Declares the csrR correct? Cursor Record of Cursor Object Type?That line declares one variable CSRR with your column structure described by the cursor (CSRO) type you declared above it. It means the CSRR variable has the columns you had in the SELECT statement in that cursor.
    When you run a cursor as you did you don't need to declare the record variable. Try this:
    CREATE OR REPLACE PROCEDURE build_summary IS
      CURSOR csro IS
        SELECT status, TIME
          FROM (SELECT substr(description, 1, 50) status, to_char(TIMESTAMP, 'MM/DD/YY hh12:mi:ss') TIME
                  FROM globalsales.cube_status
                UNION ALL
                SELECT ' TOTAL BUILD TIME',
                       to_char(to_date('00:00:00', 'HH24:MI:SS') + (MAX(TIMESTAMP) - MIN(TIMESTAMP)),
                               'HH24:MI:SS')
                  FROM globalsales.cube_status);
      --csrr csro%ROWTYPE;
      st   LONG := '';
      ss   LONG := '';
    BEGIN
      FOR csrr IN csro
      LOOP
        st := csrr.status;
        ss := csrr.time;
        dbms_output.put_line(st || ' ' || ss);
      END LOOP;
    END;Also why are you using LONG? It's a deprecated data type and Oracle recommends against using it. Either pick varchar2(4000) or CLOB.
    DBMS_OUTPUT.PUT_LINE will implicitly convert that LONG data type anyway.

  • FRM-12001:  Cannot create the record group (check your query).

    I WANT TO ADD A RECORD GROUP IN PRI BUILD FORM THE QUARY IS VERY SIMPLE LIKE
    SELECT item_code
    FROM items
    WHERE active = 'Y'
    AND item_code like 'FAJ%'
    BUT THE SYSTEM SHOW THE ERROR MESSAGE
    Cannot create the record group (check your query).

    Make sure the user connected to the database from the forms builder has the privilege of select from the table, or there's a synonym.
    Try your query from SQL*Plus connected with the same user.
    Tony

  • How to edit the records value fetched by select statement query in sqldever

    How to edit the records value fetched by select statement query in sqldever 2.1.1.
    EX-
    SELECT * FROM emp WHERE ename like 'Jaga%'
    Edited by: user9372056 on Aug 31, 2010 2:16 AM

    Hi,
    Although some forum members may be using that tool, there is still a dedicated forum for SQL Developer.
    SQL Developer
    Maybe your chances are better there.
    Regards
    Peter

  • Toplink Essentials creates not usable select statement

    My problem is the following:
    I have the following NamedQuery statement in an JPA Entity Class:
    @NamedQuery(name = "Leasingteilvertrag.findSearch",
    query = "select distinct o " +
    " from Leasingteilvertrag o " +
    " left outer join o.sachbearbeiterList s " +
    " where (:wtvStatusBearb1 is null or :wtvStatusBearb2 = -1 or o.wtvStatusBearb =
    :wtvStatusBearb3)" +
    " and (:wtvStatusVerwert1 is null or :wtvStatusVerwert2 = -1 or o.wtvStatusVerwert = :wtvStatusVerwert3)" +
    " and (:wtvAdressNr1 is null or :wtvAdressNr2 = -1 or o.wtvAdressNr =
    :wtvAdressNr3)" +
    " and (:wtvEingangsdatum1 is null or o.wtvEingangsdatum >= :wtvEingangsdatum2)" +
    " and (:wtvEingangsdatumBis1 is null or o.wtvEingangsdatum <= :wtvEingangsdatumBis2)"
    +
    " and (:wtvLlvNr1 is null or o.wtvLlvNr = :wtvLlvNr2)" +
    " and (:wtvFirma1 is null or o.wtvFirma = :wtvFirma2)" +
    " and (:wsbId1 is null or :wsbId2 = -1 or s.wsbSbId = :wsbId3)")
    Oracle Toplink translates this (according to to opmn log of the Application Server)
    to:
    SELECT DISTINCT t0.WTV_ID, t0.WTV_SL_PLUS_KNZ, t0.WTV_ABGESCHLOSSENDATUM, t0.WTV_SL_TECHNIK_DATE, t0.WTV_ADRESS_POOL, t0.WTV_SL_TECHNIK_KNZ,
    t0.WTV_AKTENZEICHEN_RA, t0.WTV_SONDERAFA_OBJEKTE_AKTUELL,
    t0.WTV_ANZAHLRUECKSTAENDIGERRATEN, t0.WTV_SONDERAFA_OBJEKTE_GEBUCHT,
    t0.WTV_BANKAUSKUNFT_KNZ, t0.WTV_STATUS_BEARB, t0.WTV_EINGANGSDATUM,
    t0.WTV_STATUS_BEARB_DATUM, t0.WTV_EINSCHAETZUNG_BONI, t0.WTV_STATUS_VERWERT,
    t0.WTV_EWB_DATUM_ERFASSUNG, t0.WTV_STATUS_VERWERT_DATUM, t0.WTV_EWB_GEBUCHT,
    t0.WTV_STATUS_FREIGABE, t0.WTV_EWB_SB_ERFASSUNG, t0.WTV_STATUS_FREIGABE_DATUM,
    t0.WTV_FIRMA, t0.WTV_VERBLEIB_AKTE, t0.WTV_WAEHRUNG_AUSFALL,
    t0.WTV_KUENDIGUNGSFORDERUNG, t0.WTV_WAEHRUNG_EWB, t0.WTV_LLV_NR,
    t0.WTV_WAEHRUNG_RUECKST_ANR, t0.WTV_LTV_NR, t0.WTV_WAEHRUNG_SONDERAFA_OBJEKTE,
    t0.WTV_PROZESSKOSTEN_RISIKO, t0.WTV_WAE_EINSCHAETZUNG_BONI,
    t0.WTV_RUECKST_ANRECHNUNG_GEBUCHT, t0.WTV_WAE_KUENDIGUNGSFORDERUNG,
    t0.WTV_SL_KASKO_DATE, t0.WTV_WIEDERGESUNDUNGSDATUM, t0.WTV_SL_PLUS_DATE,
    t0.WTV_ABGESCHLOSSEN_KNZ, t0.WTV_AKTENZEICHEN_FAV, t0.WTV_TEILRISIKO_KNZ,
    t0.WTV_AUSFALL, t0.WTV_BETRUG_KNZ, t0.WTV_EINGANGSDATUM_ALT,
    t0.WTV_CHANGE_USER, t0.WTV_EWB_DATUM_FREIGABE, t0.WTV_CHANGE_DATE,
    t0.WTV_EWB_SB_FREIGABE, t0.WTV_FREIGABE_KOMMENTAR, t0.WTV_KUENDIGUNGSDATUM,
    t0.WTV_ADRESS_NR, t0.WTV_ALTFALL_KNZ, t0.WTV_OPERATIONELLES_RISIKO,
    t0.WTV_BEMERKUNG, t0.WTV_SACHSTAND, t0.WTV_EWB_AKTUELL,
    t0.WTV_LLV_NR_UMFINANZIERUNG, t0.WTV_EWB_KORREKTUR, t0.WTV_SL_KASKO_KNZ,
    t0.WTV_FIRMA_UMFINANZIERUNG, t0.WTV_RUECKST_ANRECHNUNG_AKTUELL,
    t0.WTV_KUENDIGUNGSFORDERUNG_ALT, t0.WTV_LEASINGVERTRAG_ID,
    t0.WTV_RUECKST_ANRECHNUNG_BUC_ID, t0.WTV_EWB_BUC_ID,
    t0.WTV_SONDERAFA_OBJEKTE_BUC_ID FROM VWDB_LEASINGTEILVERTRAG t0,
    VWDB_LEASINGTEILVERTRAG t2, VWDB_SACHBEARBEITER t1 WHERE (((((((((((? IS NULL)
    OR (? = (? - ?))) OR (t0.WTV_STATUS_BEARB = ?)) AND (((? IS NULL) OR (? = (? -
    ?))) OR (t0.WTV_STATUS_VERWERT = ?))) AND (((? IS NULL) OR (? = (? - ?))) OR
    (t0.WTV_ADRESS_NR = ?))) AND ((? IS NULL) OR (t0.WTV_EINGANGSDATUM > ?))) AND
    ((? IS NULL) OR (t0.WTV_EINGANGSDATUM < ?))) AND ((? IS NULL) OR (t0.WTV_LLV_NR
    = ?))) AND ((? IS NULL) OR (t0.WTV_FIRMA = ?))) AND (((? IS NULL) OR (? = (? -
    ?))) OR (t1.WSB_SB_ID = ?))) AND (t1.WSB_LTV_ID (+) = t0.WTV_ID))
    The Problem is the "VWDB_LEASINGTEILVERTRAG t2" entry in the FROM clause of the generated select statement. This causes the select to generate the cartesian product.
    Has anyone had such a problem before? How can this be solved?

    Hello,
    I have exactly the same problem (with a simpler query though). I'm running my webapp on a GlassFish V2 (build b09d-fcs), Toplink Essentials JPA impl. and a MySQL 6.0.4 database server.
    I'm trying to run the following JPQL query: select f from Foo f where (1=1) and f.title = :title
    After having set persistence log levels to FINE, the following SQL is displayed:
    select t0.XXX, t0.YYY from Foo t0, Foo t1 where ((?=?) and (t0.title= ?))
    bind => [1, 1, Bar]
    (1 = 1) is used because of dynamic query generation (application code)
    The problem is that the additional from clause is generating a cartesian product on my Foo table, which causes many duplicated results to be returned.
    I have simplified the select part of the query but the actual query is of the same kind: no join, only 1 entity, no inheritance, a single N:1 lazy-initialized entity (*Foo-1FooParent). The only "exotic" facet of my Foo mapping is the use of an @Enumerated column.
    Is it the expected behavior?
    -Titix

  • Dynamic record group not working when apostrophes are used

    Hi Everyone,
    I have developed a Form for the most part everything is working as expected. However, there is a search functionality that is giving me problems. The issue is that when the user enters search criteria for last_name that has an apostrophe (O'brian) the search lov doesn't get populated because the dynamic record group is not getting created when the string has an apostrophe (ie O'brian). I have a dynamic record group that takes the user's search criteria and populates an LOV on the screen with the records that matched their criteria.
    Here is the code that is behind my search button where the dynamic RG gets created. It works fine for all searches that don't contain an apostrophe. Btw, the Oracle Forms version is 10g.
    DECLARE
    p_where_debtor varchar2(2000);
    p_where_liab varchar2(2000);
    rg_id RecordGroup;
    v_query varchar2(2000) := null;
    rg_name varchar2(2000):= 'RG_LIAB_LST';
    errcode NUMBER;
    BEGIN
    IF :SEARCH.cd_nb is null and
    :SEARCH.cd_seq is null and
    :SEARCH.f_name is null and
    :SEARCH.l_name is null and
    :SEARCH.mi_name is null
    then
    display_message ('Search criteria must be entered');
    raise form_trigger_failure;
    END IF;
    v_query := 'SELECT last_name, first_name, middle_name, c_no, c_seq
    FROM TABLE_VW2 WHERE 1=1';
    /*Search criteria entered by user*/
    IF :SEARCH.l_name_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(last_name) LIKE '''||UPPER(:SEARCH.l_name)||'%''';
    END IF;
    IF :SEARCH.f_name_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(first_name) LIKE '''||UPPER(:SEARCH.f_name)||'%''';
    END IF;
    IF :SEARCH.mi_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(middle_name) LIKE '''||UPPER(:SEARCH.mi_name)||'%''';
    END IF;
    IF :SEARCH.cdcs_nbr_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(c_no) LIKE '''||UPPER(:SEARCH.cd_nb)||'%''';
    END IF;
    IF :SEARCH.cdcs_seq_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(c_seq) LIKE '''||UPPER(:SEARCH.cd_seq)||'%''';
    END IF;
    /*Make sure record group doesn't exisit*/
    rg_id := Find_Group(rg_name);
    /*If it doesn't exist then create record group*/
    IF id_null(rg_id) THEN
    rg_id:= create_group_from_query(rg_name,v_query);
    END IF;
    IF NOT id_null (rg_id) THEN
    delete_group (rg_id);
    rg_id:= create_group_from_query(rg_name, v_query);
    END IF;
    errcode := Populate_Group(rg_id);
    Any help would be greatly appreciated.
    Thanks,
    Adrian

    For every item where an apostroph can occur, do a
    REPLACE(:BLOCK.ITEM, '''', '''''');

  • Understanding the internal operation of creating a record group

    Hi gurus,
    When record group is created, if the query has a lot of records generated , does the form actually retrieve all the data from database in the record group when get_group_xxx function is called or there is also buffering like we do execute query from a base table block where only a set of data being buffered is retrieved from db.
    The concerns is that whether the memory will increase exponentially if the data retrieve from record group is huge.

    The group is not populated when you create it. However, when you issue the populate_group command, it does indeed retrieve all the records into memory. So it is not a good idea to use a record group if you will retrieve more than a few thousand rows.

  • Need a Way to Create a Local Group Push via GPO on Windows Server 2003 DC

    There is a new requirement to create a new local group on all machines and add all local and built-in administrators. To save time, I would like a GPO to create the new group, along with configuring its members. Any helpful information I found
    is for Windows Server 2008 and up.
    Does anyone know what I can do with my Windows Server 2003 DC?
    Thanks,
    Jasmin

    > Does anyone know what I can do with my Windows Server 2003 DC?
    Since DCs do not have local groups - what OS are your member servers and
    clients running? If 2003/XP: Install KB943729
    You need _one_ computer running Vista/2008 or higher to edit your GPO.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Order by column not in select statement

    Want to select multiple columns from a single table, and order by a column on the same table, but that is not in the select statement, or simply not shown in the output of the statement..
    Any help appreciated..

    Hi,
    In most cases, you can ORDER BY any column in the table(s) used, whether it is in the result set or not.
    Otherwise, include the column. Your front-end tool may be able to suppress the display, if you really don't want to see it.
    For example, in SQL*Plus
    COLUMN  dont_show  NOPRINTcauses any column named (or aliased) dont_show not to appear in the output.
    In Oracle9 (and up) sub-queries with ORDER BY return their results in order, so you can say things like:
    SELECT  col_a
    ,       col_b
    FROM    (
            SELECT    col_a
            ,         col_b
            ,         col_x   -- Not included in final output
            ORDER BY  col_x
            );

  • Using ORDER BY for column that's not in SELECT statement of select list?

    Hi all.
    I have a select list on an APEX page at apex.oracle.com, and I would like to order this by the value of column UnitOrder.
    The SQL is as follows:
    SELECT DISTINCT foodunit.name AS display_value, foodunit.foodunitid AS return_value
    FROM foodunit, food
    WHERE foodunit.foodid = :P18_FOODID
    ORDER BY foodunit.unitorder ASC;Off course, this code won't work. And since it's a select list, I can't just add foodunit.unitorder to the SELECT statement. Also, I can't get rid of the DISTINCT, because then for some reason it tends to display an infinite amount of the same row...
    The point of ordering it by UnitOrder is that all units who begin with gram, ml, mg, kg,... etc, will be shown on top of the select list. All other food units will be shown on the second place and so on.
    The column UnitOrder holds either 1 or 2 as a value. 1 is the value for all rows that should be displayed at the top of the select list, 2 is the value for all the rest.
    So, what I want is that all rows in which the UnitOrder is 1, get displayed on top of the select list. Usually only 2 list items get shown in the select list at a time, depening on which food item a user has selected. The select list then refines to certain rows that match the foodid etc etc..
    If anyone has an idea, I'd be very happy to hear about it.

    Thanks! I didn't think about using a join. Code works now, and is as follows:
    SELECT foodunit.name AS display_value, foodunit.foodunitid AS return_value
    FROM foodunit
    INNER JOIN food
    ON food.foodid = foodunit.foodid 
    WHERE foodunit.foodid = :P18_FOODID
    ORDER BY foodunit.unitorder ASC;

  • Create Dynamic table name in the select statement.

    I use oracle reports 6i to make myrep.rdf , this report created using certain select query Q1, I created a formula column in this report,
    in the formula column  I write pl/sql block statements to select the data from certain table depends on the output of a column in Q1,
    I want to make the pl/sql block dynamically enough to change the user which I select the data from depends on the connected user
    Ex: if I connected with user = 'KAM14'
    the pl/sql block will be
    select x into v_value from kam13.bil_file where .....;
    and if  I connected with user = 'KAM13'
    the pl/sql block will be
    select x into v_value from kam12.bil_file where .....;
    and so on
    how can I do this in the pl/sql block ...
    Thanks in Advance.

    I am not sure I understood properly, but I think you should create bil_file table under a different user and create synonyms  under KAM1x users.
    Regards

  • Record group in the CUSTOM.pll lib...

    Hi,
    According to the Developer's Guide (page 28-3) ...
    "You cannot use any SQL in the library. However, *you can use a record group to issue SELECT statements*, and .....".
    Is there any example, document showing this approach...????
    Note: I use EBS 11.5.10.2
    Thank you,
    Sim

    Hi ashok:
    Please check below and see its helpful:
    HOW TO DELETE OR ADD COLUMN NAMES FROM AN LOV COLUMN MAPPING [ID 1064257.6]
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/frm_tabular.htm
    Also please check:
    FAQ For Oracle Quality Application for Setup, Charts and Reports, and General Questons [ID 395807.1]
    Regard
    Helios

Maybe you are looking for