Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to populate list in oracle form using a dynamic recordgroup based on an Sql which has varibales to be parsed at run time.

Posted on 2009-04-07
3
4,742 Views
Last Modified: 2013-12-11
How to populate list in oracle form using a dynamic recordgroup based on an Sql which has varibales to be parsed at run time.
0
Comment
Question by:haf70
  • 2
3 Comments
 
LVL 20

Assisted Solution

by:flow01
flow01 earned 20 total points
ID: 24089643
to get the idea : can you give some examples of what should be dynamic and which variables are involved ?
In an record group you can refer to forms globals and block.items.
0
 

Author Comment

by:haf70
ID: 24093998
Please see the procedure below which I am using to populate the the record group.
I am facing problem with the variables used in the query string.


PROCEDURE populate_hr_list IS
rg_id   RECORDGROUP :=NULL;
V_RG_NAME VARCHAR2(100);
V_STATUS NUMBER;
v_query varchar2(1000) :=NULL;
BEGIN
      V_RG_NAME := 'hr';
      CLEAR_LIST(:VARS.L1);
      
     rg_id := FIND_GROUP(V_RG_NAME);
      IF NOT ID_NULL(rg_id) THEN
         DELETE_GROUP(rg_id);
     END IF;
     v_query := 'select '|| :vars.a||', '|| :vars.b||' from dual';
     rg_id :=CREATE_GROUP_FROM_QUERY(V_RG_NAME ,V_QUERY);
     IF NOT ID_NULL(rg_id) THEN
       V_STATUS := POPULATE_GROUP(rg_id);
       POPULATE_LIST(:VARS.L1,rg_id);
    END IF;
    DELETE_GROUP(rg_id);
end;
0
 

Accepted Solution

by:
haf70 earned 0 total points
ID: 24094411
Found solution

put 3 quotes in front and back of the variable within the query variable.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Queries 15 45
su - oracle could not open session 6 95
clob to char in oracle 3 62
Need help on decision table structure 7 28
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to recover a database from a user managed backup

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question