【问题标题】:How to populate specific data from database into list item?如何将数据库中的特定数据填充到列表项中?
【发布时间】:2018-12-14 23:12:45
【问题描述】:

我为部门编号 (10,20,30) 创建了具有列表样式 (Poplist) 的 ListItem1,并为员工姓名创建了具有列表样式 (Tlist) 的其他 ListItem2。员工姓名记录组

当我点击 10 号部门时,然后将所有员工姓名数据填充到 ListItem2 中。我想只填充属于部门号 10 或 20 或 30 的员工姓名的数据

代码:

DECLARE

a VARCHAR2(100);
num NUMBER := 10;

BEGIN

a := populate_group ('R1');
    populate_list ('LIST1','R1');

END;

“LIST1” 用于填充员工姓名数据 “R1”是组记录名

【问题讨论】:

    标签: oracle oracle11g oracle10g oracleforms


    【解决方案1】:

    听起来您只需将where department_no = :List1 添加到 R1 记录组即可。

    【讨论】:

      【解决方案2】:

      在 PL/SQL 中,列表称为集合。

      试试类似的东西:

      DECLARE
        TYPE population_type IS TABLE OF NUMBER INDEX BY VARCHAR2(64);
        country_population population_type;
        continent_population population_type;
        howmany NUMBER;
        which VARCHAR2(64)
      
      BEGIN
        country_population('Greenland') := 100000;
        country_population('Iceland') := 750000;
        howmany := country_population('Greenland');
      
        continent_population('Australia') := 30000000;
        continent_population('Antarctica') := 1000; -- Creates new entry
        continent_population('Antarctica') := 1001; -- Replaces previous 
      value
        which := continent_population.FIRST; -- Returns 'Antarctica'
      -- as that comes first alphabetically.
        which := continent_population.LAST; -- Returns 'Australia'
        howmany := continent_population(continent_population.LAST);
      -- Returns the value corresponding to the last key, in this
      -- case the population of Australia.
      END;
      

      【讨论】:

      • 你错了,我想。这是一个Forms 问题,而不是(一般)PL/SQL 问题。表单的“列表”与您所说的不同。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-05
      相关资源
      最近更新 更多