Creating dynamically record group.

Hello

I have multi line block. My req is I create record group dynamically based on some fields of line level. This item then my card code - key.

DECLARE
group_id RecordGroup;
v_lms_lov lov.
BEGIN

group_id: = Create_Group_From_Query ("RG_LMSID",
' SELECT lms_id
OF sify_lms_header
WHERE from_location =: lines.from_location
AND to_location =: lines.to_location; »

v_lms_lov: = find_lov ('LOV_LMSID');

set_lov_property (v_lms_lov, group_name, 'RG_LMSID');

Set_Item_Property('LINES.) LMS_ID', LOV_NAME, 'LOV_LMSID');

END;

It is said, no record in lov. Anything I've missed.
Or any other way to do this.
Pl help.

Thank you
Kouadio

Kouadio,

Why you need dynamic disk group for this?, you can give the control names in the query of the record group. Then the query of the record group will be

SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = :LINES.FROM_LOCATION AND TO_LOCATION = :LINES.TO_LOCATION

If you still want to use dynamic disk group creation, then try

DECLARE
     RG_Group_ID RECORDGROUP;
BEGIN
     RG_Group_ID := FIND_GROUP('RG_LMSID');
  IF NOT Id_Null(RG_Group_ID) THEN
          DELETE_GROUP(RG_Group_ID);
  END IF;
     RG_Group_ID := CREATE_GROUP_FROM_QUERY('RG_LMSID', 'SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = ''' || :LINES.FROM_LOCATION || ''' AND TO_LOCATION = ''' || :LINES.TO_LOCATION || '''');
     SET_LOV_PROPERTY('LOV_LMSID',     GROUP_NAME, 'RG_LMSID');
     SET_ITEM_PROPERTY('LINES.LMS_ID', LOV_NAME,   'LOV_LMSID');
END;

Kind regards

Manu.

If my response or response from another person was helpful, please mark accordingly

Tags: Oracle Development

Similar Questions

  • create dynamically a group of record based on previously entered record Grou

    Forms [32 bit] Version 10.1.2.3.0 (Production)

    Hello
    I know how to create dynamically record based on a query and put the code in when a new instance of the form.
    My request is. I have a form that includes several groups of Record and the user wants to dynamically create the following groups based on the previous groups.

    For example
    I have a record group with choosing a location.
    When the user selects the location from a list of values
    the 2nd record group called "Cost Centres" will have to filter only those whose locations selected above.

    How can I fill the 2nd record running when I don't know what site the user will choose?
    If I just simply fill in when new instance of form as the location and just select the entire document, populates the list of values.

    CC field is a LIST ELEMENT and the style of list is a LIST of POP, is not necessary.

    I put the code in the location of the trigger when-list-changed field.
    I get this error:
    FRM-41337: cannot complete the record group list

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

    Hello
    Once registration State Gets the change to block you cannot fill/repopulate the list item. Keep these list items as element non-base of data with different names and create different items such as database Moose points. That assign values in triggering WHEN-LIST-CHANGE for real database items.

    -Clément

  • Dynamic record group works not when using apostrophes

    Hello world

    I developed a form most of the time, everything works as expected. However, there is a search feature that gives me problems. The problem is that when the user enters the search criteria for last_name with an apostrophe (O'brian) lov research get filled because the dynamic disk group is not created when the string contains an apostrophe (i.e. O'brian). I have a dynamic disk group that takes the user's search criteria and fills a LOV on the screen with the corresponding records to their criteria.

    Here is the code that is behind my search button where the dynamic RG is created. It works very well for any research that does not 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 name, middle_name, c_no, c_seq
    FROM TABLE_VW2 WHERE 1 = 1';
    / * Search criteria entered by the user * /.

    IF: SEARCH.l_name_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (last_name) AS"' | Upper(:Search.L_Name) | » %''';
    END IF;

    IF: SEARCH.f_name_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (first_name) AS"' | Upper(:Search.F_NAME) | » %''';
    END IF;

    IF: SEARCH.mi_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (middle_name) AS"' | Upper(:Search.mi_name) | » %''';
    END IF;

    IF: SEARCH.cdcs_nbr_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (c_no) AS"' | Upper(:Search.cd_nb) | » %''';
    END IF;

    IF: SEARCH.cdcs_seq_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (c_seq) AS"' | Upper(:Search.cd_seq) | » %''';
    END IF;

    / * Make sure that the record group exists * /.

    RG_ID: = Find_Group (rg_name);

    / * If there are then create record group * /.

    IF id_null (rg_id) THEN
    RG_ID: = create_group_from_query (rg_name, v_query);
    END IF;

    IF this is 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.

    Thank you

    Adrian

    For each item where an apostroph may occur, make a

    REPLACE(:BLOCK.ITEM, '''', '''''');
    
  • How to create dynamic Services based on VMware files

    Hello

    We would like to create as many services as VMware folders in VMware, so whenever we will be add/remove any computer file VMware virtual of the service components will also be day/follow-up...

    We check the option "Create a rule to include a group of components" in the function Builder, and adding the conditions of rule as:

    ! VFolder where name like ''.

    But the result is not successful, because we are unable to choose the right component that inherites the VFolder type components...

    The same works of query in the "Script Console" and the children of the property spreads with all virtual machines...

    Any ideas?

    Thank you.

    Hi Eneko

    One of our systems Consultants found a carton of community that creates dynamic records VMWare-based services. I have attached the cartridge and I included some comments from the author, Thomas Bryant.

    I am pleased to announce the release of version 1.0 of a cartridge personalized for VMware files.  I had a lot of customers ask me to automatically build services in vFoglight based on the structure of folders in vCenter, and that is exactly what will make this cartridge!  This cartridge contains a rule that runs once per hour and will create a category called files VMware services and then for each vCenter, the data center and the series of records, create services and add virtual machines to each, as in vCenter.  Simply load the cartridge and wait about 30 to 60 seconds depending on the number of files you have, and then services will be created.  Please let me know if things work, good or bad.

     

    Updated - Version 1.0.1 released

    The update fixes a problem with the sort order of the structure "Virtual Machines and templates" vs "Hosts and Clusters" and the following files which were not created properly.

     

    Known issues - currently will not remove a service based on a folder that has been deleted from vCenter.  I'll look to add this in the next version.

    One last thing. After you install the cartridge, a new rule, named Custom - create/update records VMware will be added under VMware_Folders cartridge. If edit you it and look at the Conditions & Actions tab, you should be able to see the groovy script that is used to create and populate the services. Here, you should be able to edit the prefix added to each folder in Foglight. By default, the prefix is "Folder_.

    I hope that this solution is satisfactory for you,

    Kind regards

    Gaston.

  • Dynamic disk group

    Please explain me step by step to create the dynamic disk group and fill in the drop-down list box.

    Thank you
    Rupal

    Published by: rupearlkaushal on June 13, 2012 21:39

    Hi Virginia

    / * One TIME-NEW-FORM-BODY relaxation * /.

    DECLARE
    
    rg_countries RECORDGROUP; -- the dynamic record group declaration type
    
    rg_name VARCHAR2(40) := 'country'; --  the name of record group
    
    vTemp NUMBER;
    
    BEGIN
    
    -- Pls make sure Group doesn't already exist this is step is done as a check NOT for using the list for the first time but the second , and more.
    
    rg_countries  := FIND_GROUP(rg_name);  --- Look for the RG is it  already exist in Memory ?
    
    -- If it doesn't exist then create it and add ur query to it (First time running)
    
    IF Id_Null (rg_countries) THEN  -- if it doesn't exist then create it
    
    rg_countries:=CREATE_GROUP_FROM_QUERY(rg_name ,
    'SELECT country_name NAME, COUNTRY_ID VALUE FROM COUNTRY ORDER BY 2');
    
    --Populate the Record Group -- and display it pls in a variable for HOLDING it on hand First in the memory ---
    
    vTemp:=POPULATE_GROUP(rg_countries);
    
    -- Then Show it to me in Run time i wanna see it with my eyes cause i can't see it in a variable
    
    POPULATE_LIST('BLOCK3.COUNTRIES', rg_name);
    
    END;
    
     
    

    It's she... :)

    I hope this helps...

    Kind regards

  • How to use record group to insert data into the hierarchy tree?

    Hello

    I had a hierarchical tree in my block and I want to use the record group to display
    in the hierarchy tree, call david_tree. He did work for the code I try below
    and I think it might be that the create_group_form_query was wrong? or miss an order?


    DECLARE
    htree;
    rg_data RECORDGROUP;
    v_ignore NUMBER;
    BEGIN
    htree: = Find_Item ('tree_block.david_tree');

    rg_data: = CREATE_GROUP_FROM_QUERY ('rg_bank',
    "select name, short_name".
    || "from css_banks");

    -Fill the record with data.

    v_ignore: = POPULATE_GROUP (rg_data);

    -Transfer the data from the record group to the hierarchical
    -tree and bring it to display.

    FTREE. SET_TREE_PROPERTY (htree, FTREE. (RECORD_GROUP, rg_data);

    END;


    Thank you


    David

    David,
    You get an error with your code? Looks like you took your example code help Forms. I don't really see a problem with the code, but the forms example gives an example of how create the record group used by the HTree so the Receiver General may be the cause of the problem. When I used the HTree, I used the FTREE. Procedure ADD_TREE_DATA to fill the tree. When I started working with HTree I created a wrapper package to simplify the process. You can watch how I work with the HTree in a demo that I published called: forms and how to: create a shape of the HIERARCHICAL tree.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • Fill area of the screen with the first value in the record group

    Hi guys, what the title essentially says. I have a display element that is populated by the by selecting the appropriate option in a LOV. Is there a method that I can put in when a new instance of the form or something else to fill the screen with the first item in the record group used to fill the lov to ensure when the load form display area is not empty. I know I have to hard just in code, but I would have the value come from the record group.


    Thank you

    Published by: user13390506 on August 25, 2010 05:39

    This works very well for me:

    Created a record group (RG1) with the following order of selection:

    select table_name, table_name from user_tables order by 1
    

    Created a button on the Web that are running the following:

    PROCEDURE pop IS
       rg_id RecordGroup;
       gc_id GroupColumn;
       col_val VARCHAR2(1000);
       n number ;
    BEGIN
    
       rg_id := Find_Group( 'rg1' ); 
    
       IF Id_Null(rg_id) THEN
       Message('Record Group rg1 does not exist.');
       RAISE form_trigger_failure;
       END IF; 
    
       n := Populate_Group( rg_id) ;
       gc_id := Find_Column( 'RG1.TABLE_NAME' ); 
    
       IF Not Id_Null(gc_id) THEN
         col_val := GET_GROUP_CHAR_CELL( gc_id, 1 );
         message(col_val);
       End if ;
    
    End;
    

    I guess the record_name.column_name at the top of case...

    François

  • dynamically populate a record group on fly uisng LOV

    Hello

    I want to create dynamically populate a group of disks on the fly uisng LOV.


    1. here's how resemble the subject of record RG_BANKNAME group

    Subject: Folder group

    Name: RG_BANKNAME

    Record group Query: SELECT NAME, SHORT_NAME OF C_BANKS


    2. I create the button and when the user clicks on it will appear the LOV.



    DECLARE
    RG_ID RecordGroup;
    ERRCODE NUMBER;
    BOOLEAN status;
    BEGIN
    RG_ID: = Find_Group ('RG_BANKNAME');

    IF Id_Null (rg_id) THEN
    Message ("no such group: ', acknowledgement of RECEIPT");
    RAISE Form_Trigger_Failure;
    ON THE OTHER
    Errcode: = POPULATE_GROUP (rg_id);

    SET_LOV_PROPERTY ('LV_NAME', TITLE, 'My own LOV');
    SET_LOV_PROPERTY (groupname, 'LV_NAME', rg_id);

    SET_LOV_COLUMN_PROPERTY ('LV_NAME', 1, 'NAME', title);
    SET_LOV_COLUMN_PROPERTY ('LV_NAME', 1, width, 150);
    SET_LOV_COLUMN_PROPERTY ('LV_NAME', 2, title, 'SHORT NAME');
    SET_LOV_COLUMN_PROPERTY ('LV_NAME', 2, width, 100);

    status: = Show_LOV ('LV_NAME', 10, 20);

    In the CONTRARY CASE the status THEN
    Message ("you have not selected a value.");
    Bell;
    END IF;
    END IF;
    END;


    My question is should I create name object LOV 'LV_NAME "? given that I do not have it
    create on my design time, because I thought that it can be done dynamically on the fly.

    The problem is consistent that the Lov Id is not valid.

    Thank you


    David

    Published by: user445990 on May 24, 2011 21:19

    OK, so the LOV MUST exist at the time of the design, because you cannot create it dynamically.

    François

  • Create dynamic Lov in custom.pll

    Hi all

    I need to create dynamic Custom.pll LOV I want to associate this LOV and Recordgroup with the Flexfield. How can I do this?
    I created a dynamic disk group of the statement "CREATE_GROUP_FROM_QUERY".

    The point is, that I have a field on a standard form which calls the article number, and I want to display in the flexfield one that lists the folders that I show depends on the value that I have type in the item number field. I do everything in custom.pll. I have no customization of forms being the version 11.5.8.

    Please, can you help me?

    Cordially Mariano. -.

    Hello

    That you have created a group, you can take any defined LOV and associate the group property to set_item_property.

    And you can again change LOV the runtime to use the other group for registration according to the use.

    But LOV must be defined at the time of the design only, only record group can be associated with dynamically.

    Kind regards
    Kiran.

  • How to create dynamic ObjectChoiceField?

    Hello friends,

    I want to create the search section for what I want to create dynamic choiceField. Tell me how to create that. I want 4 field of choice.

    Select the Continent-> Africa, Asia, Europe, America, South America, Antarctica, Oceania
    Select the country
    Select the region
    SELECT City

    here if I select Asia I want to show in the field of choice throughout Asia of County County, after that, if I sect Asia County I want to show all the area of that County and if I show a region that show the whole of the region. Than please tell how I do?

    It doesn't matter what Web service?

    How I do?

    you found NPES because obj_country is null.

    I think you can try with the recording of information in text files.

    String str_continent[]= new String[]{"Select Continent","Africa", "Asia", "Europe"," North America", "south America"," Antarctica","Oceania"};
    final ObjectChoiceField obj_Country=new ObjectChoiceField();
            obj_Country.setLabel("Countries");
    final ObjectChoiceField obj_continent=new                                                                                         ObjectChoiceField("Continent",str_continent){
             protected void fieldChangeNotify(int context) {
            if(getSelectedIndex()==2)
                    {
    InputStream in = getClass().getResourceAsStream("Asia.txt");
    String[] asianCountries =new  String[0];
    try {
    asianCountries = StringUtilities.stringToWords(new String(IOUtilities.streamToBytes(in)));
    } catch (IOException e) {
    e.printStackTrace();
    }
    
                        obj_Country.setChoices(asianCountries);}
    super.fieldChangeNotify(context);
                }
            };
    
            add(obj_continent);
            add(obj_Country);
    
  • FRM-30187: size of the column of type CHAR in the record group must be between 1 and 2000.

    Hi, forms 6i, db 10g

    I created a lov based on this query

    select * from items_qty_vu -- database view
    

    and the view code is

    CREATE OR REPLACE FORCE VIEW items_qty_vu (serial, item_id, expiry_date, qty)
    AS
       WITH item_units_plus AS
            (SELECT item_id, unit_id, factor,
                    LEAD (factor, 1, 1e99) OVER (PARTITION BY item_id ORDER BY factor)
                                                                   AS next_factor,
                    ROW_NUMBER () OVER (PARTITION BY item_id ORDER BY factor DESC)
                                                                           AS rnk
               FROM item_units)
       SELECT     ID.serial, ID.item_id, ID.expiry_date,
                  SUBSTR
                     (SYS_CONNECT_BY_PATH (   TRUNC (  MOD ((  ID.qty
                                                             - ID.qty_allocated
                                                            ),
                                                            iup.next_factor
                                                           )
                                                     / iup.factor
                                                    )
                                           || ' '
                                           || u.unit_name,
                                           ', '
                                          ),
                      3
                     ) AS qty
             FROM item_detail ID JOIN items i ON i.item_id = ID.item_id
                  JOIN item_units_plus iup ON iup.item_id = ID.item_id
                  JOIN units u ON u.unit_code = iup.unit_id
            WHERE CONNECT_BY_ISLEAF = 1
       START WITH iup.rnk = 1
       CONNECT BY iup.rnk = PRIOR iup.rnk + 1 AND ID.serial = PRIOR ID.serial
         ORDER BY ID.serial;
    
    

    When I compile the form, I face the error FRM-30187,

    If I replace my query "select * from items_qty_view" with "select item_id, serial, expiry_date of items_qty_vu", it compiles successfully.

    As salamualikum, Salem,.

    You must follow my instructions carefully.

    1. Select the record group.

    2. go in the record group property

    3. Select and open the column specifications

    4. highlight the column and check the decrease of the length, the bellows of the size that you cross more than 2000 then 2000.

    Compilation of now and you're done.

    Wow. you did.

    Hamid

  • Is there a limitation of length of sql in a record group?

    Record group contains 4 by union funcion sql statement. When this sql statement longer than 4000 characters then the record group do not allow me to add an additional column to another.

    My question is, is there a limitation of length of sql that record the group support?

    Developer 10g suit.

    Thanks in advance.

    As you have discovered that there is a limit in the form designer, on what size the SQL statement may be in the property Query Group Record in your record group.  Unfortunately, the forms for the Query Group property help topic Record does not that there is a limit or the limit.

    If your request does not fit into the Group Record Query property, you can try to use the integrated Create_Group_From_Query() to fill in your group.  Another option would be to create views in your database, and then select the view in the Query property group Record.

    If you opt to try the method of Create_Group_From_Query(), just set your Group Record in the navigation of the object by using a SELECT statement (your column names) twice and then programmatically remove the Group and re-create it with the high - Create_Group_From_Query ().  See the help topic for the function integrated for a code example.

    Craig...

  • No VMs are displayed in the create a Protection Group Wizard

    Hello

    I want to test a recovery plan and I (hopefully) set up correctly.

    The two sites are connected and I set up the Mappngs, the records, the Placehoders and networks etc.

    I had a failure with a Protection Group who had no VMs in it.

    And that is the problem.

    When I go to create a Protection Group (with RSV) I don't see any virtual machines listed.

    My VMs are sitting on a Lun on the production side and this Lun is mapped to a logical unit on the recovering Site number.

    The LUNS are Openfilers

    Can someone tell me why I can't see the virtual machines or elsewhere the Lun?

    Is it because the logical unit number is Openfiler?

    This is my first time out of MRS so don't have a lot of experience with that.

    See attached PS

    Thank you very much

    Patsfan

    Have a look here for the installation of the replication of vSphere step by step and configuration with SRM: installation 5.1.1 SRM & amp; vSphere replication & #8211; Part 2 | VMFocus

  • A function can be called record group - Oracle Form 6i.

    Hi all

    I want to create query based LOV in Oracle Form 6i.

    The query I have use of the record group is as follows:

    SELECT DISTINCT

    Nr.rec_locator AS rec_locator,

    car.car_dte AS car_date,

    Get_car_info(:CON.) REF_NO) AS car_number

    Car_list_entries CAR

    contact_details cdt,

    name_records nr

    WHERE car.car_id = cdt.car_id

    AND cdt.nr_id = nr.id

    AND cdt.con_ref_no =: CON. REF_NO

    / * Get_car_info (x NUMBER) is a function of form * /.

    This generates an error:

    It is said

    FRM-12001 (impossible to create the Group Record (check your query)


    Kindly guide how can I use the function of form to achieve the desired result.

    Thank you very much

    Anoop.

    Hi Anoop,

    I can assure you that the issue is not because of the called function of the record group.

    I used the query showing the value of the function; but one thing you should keep in mind is:

    If you create a new item not related in a based lov to sql expression that

    return a character data type, and if the element related to the used in the function

    is generated with a size of 0, then the item not related is generated

    with a size of 4000 and a compilation of the form failed with error FRM-30187

    the solution to this problem is: lov property > column specification > columns one will be having a greater length and 2000 it set its 2000 which is the maximum value. Then it won't work.

  • pl/sql dynamic record statement

    Hi all

    I am very curious to find a way to declare a dynamic record type in the Declaration of a PL/SQL block section. Forgive me if I do not use the right jargon. I am a newbie to pl/sql.

    I work with the HR schema that comes integrated with SQL Developer. My procedure resembles




    ---------
    create or replace
    PROCEDURE PROC3 (v1 in v2 in VARCHAR2, VARCHAR2) IS - v1 = employees; v2 = tmp_emp_1
    v_str VARCHAR2 (100);
    MSG VARCHAR2 (50);
    MSG2 VARCHAR2 (50);
    msg3 VARCHAR2 (50);
    var_rows VARCHAR2 (50);
    var1_rows VARCHAR2 (50);
    var2_rows varchar (50);
    table_not_found EXCEPTION;
    code_text VARCHAR2 (50);
    v_str1 VARCHAR2 (100);
    v_str2 VARCHAR2 (50);
    v_str3 VARCHAR2 (100);
    v_str4 VARCHAR2 (100);
    var_ins VARCHAR2 (100);
    var_ins2 VARCHAR2 (100);
    v_cur VARCHAR2 (100);

    TYPE emp_rec_var IS table of employees % rowtype;

    -employee table emp_rec_var IS % ROWTYPE;
    SheikYerbouti emp_rec_var; -SheikYerbouti is a table

    -v_cur: = ' cursor emp_insert is Select * from '. v1;

    Type emp_insert_ref is ref cursor;
    emp_insert emp_insert_ref; -emp_insert is a cursor


    BEGIN
    -Drop the tmp_emp_1 table
    v_str: = 'DROP table ' | v2;
    run immediately (v_str);
    var_rows: = SQL % ROWCOUNT;
    dbms_output.put_line ('Table tmp_emp_1 with' | var_rows |) "lines has been abandoned");

    -Tmp_emp_1 table creation
    v_str1: = 'CREATE table ' | v2 | ' in select * from '. v1 | "where 1 = 0';
    run immediately (v_str1);

    -Inserts in tmp_emp_1 via an Insert bulk
    var_ins: = 'Insert into ' | v2 | ' (select * from ' | v1 | ")'; » ;
    var1_rows: = SQL % ROWCOUNT;
    dbms_output.put_line ('Total of ' | var1_rows |) "the lines have been inserted in tmp_emp_1 through bulk insert");

    -A fall tmp_emp_1
    v_str2: = 'Drop table ' | v2;
    run immediately (v_str2);

    -Creation of tmp_emp_1
    v_str3: = 'Create table ' | v2 | "in select * from employees where 1 = 0';
    run immediately (v_str3);

    -Insert in tmp_emo_1 via the emp_insert slider
    Open for Emp_insert
    ' Select * from '. v1;

    Get the emp_insert COLLECT IN BULK SheikYerbouti.

    for n in emp_rec.first... emp_rec loop. Last
    v_str4: = "insert" | v2 | ' (employe_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id)
    values (SheikYerbouti (n) .employee_id, SheikYerbouti (n) .first_name, (n) .last_name, .email SheikYerbouti SheikYerbouti (n), SheikYerbouti (n) .phone_number, SheikYerbouti (n) .hire_date, SheikYerbouti (n) .job_id, (n) SheikYerbouti .salary SheikYerbouti (n) .commission_pct, SheikYerbouti (n) .manager_id, emp_rec (n) .department_id)';
    run immediately (v_str4);

    var2_rows: = SQL % ROWCOUNT;
    dbms_output.put_line ('Total of ' | var2_rows |) "lines have been inserted in tmp_emp_1 through slider emp_insert");
    end loop;
    Close Emp_insert;


    EXCEPTIONS - Management error
    WHILE OTHERS THEN
    dbms_output.put_line (' unexpected error!) You need to be better at programming dumb-ass! ") ;
    NULL;

    END PROC3;

    ------

    For the line in bold above ' + TYPE emp_rec_var IS table employees % rowtype + ', I want to replace it with "employees" to the variable "v1" (declared in the procedure) so that the record statement of 'TYPE' becomes dynamic. Any suggestions are welcome.

    Thank you

    You cannot declare a record type dynamically.

    You can, if you were really desperate, use dynamic PL/SQL construction instead of simply using dynamic SQL. It is very rare, however, that dynamic SQL is actually a good idea and it is extremely rare that the dynamic PL/SQL use is a good idea. You call yourself a newbie makes me strongly suspect that you really want to focus on learning to do things normally don't not focusing on features that are rarely used correctly and frequently abused.

    Justin

Maybe you are looking for

  • Cursor crazy

    I am a journalist and typing very quickly, usually using an Apple Mac.I have just started using a Toshiba netbook on the move and am pleased that it aside from the crazy jumping cursor.I will be typing in full skin only to discover that the cursor ju

  • Satellite M100-P345: USB device is recognized but it doesn't work

    My usb port works with external hard drive but not usb key USB flash drive. This problem occur because I update my XP Home Edition of XP pro SP2 edition. I've updated all the latest patch but the problem stil occur. The system can not assigned a play

  • ios9.2 lost my date on the printed page

    How can I find date is more printed at the bottom of the page, because I have updated the software for the ipad?

  • attempted to delete avg, the pilot could not (oxoooooooo) msi IAM failed

    IV, e attempted to remove avg anti virus and its action of msi driver failed (oxoooooooo) display failed

  • understand the vmkernel log messages

    Hi people,I had some performance issues in my virtual machine and looking in the logs files, I found this strange message:Can someone explain to me what this (in red below) vml.xxxxxxxxxxxxx means? Is a data store? Path?28 June 12:57:08 xxx vmkernel: