zoukankan      html  css  js  c++  java
  • Using GET_GROUP_SELECTION For Record Groups in Oracle Forms

    Retrieves the sequence number of the selected row for the given group. Suppose you want to get a particular column value from a record group for the all rows or for particular rows, then you can use get_group_selection built-in to perform the task.

    Example:

    /*
    Built-in: GET_GROUP_SELECTION Example: Return a comma-separated list (string) of the selected part  numbers from the presumed existent PARTNUMS record group.
    */
    FUNCTION Comma_Separated_Partnumbers
    RETURN VARCHAR2 IS
    tmp_str VARCHAR2(2000);
    rg_id RecordGroup;
    gc_id GroupColumn;
    the_Rowcount NUMBER;
    sel_row NUMBER;
    the_val VARCHAR2(20);
    BEGIN
    rg_id := Find_Group(’PARTNUMS’);
    gc_id := Find_Column(’PARTNUMS.PARTNO’);
    /*
    Get a count of how many rows in the record group have been marked as "selected"
    */
    the_Rowcount := Get_Group_Selection_Count( rg_id );
    FOR j IN 1..the_Rowcount LOOP
    /*
    Get the Row number of the J-th selected row.
    */
    sel_row := Get_Group_Selection( rg_id, j );
    /*
    Get the (VARCHAR2) value of the J-th row.
    */
    the_val := Get_Group_CHAR_Cell( gc_id, sel_row );
    IF j = 1 THEN
    tmp_str := the_val;
    ELSE
    tmp_str := tmp_str||’,’||the_val;
    END IF;
    END LOOP;
    RETURN tmp_str;
    END;


  • 相关阅读:
    nohup 运行后台程序
    配置了yum本地源
    rhel 6.7 离线安装docker
    java timer 执行任务
    遇到的sql关键字
    mysql事务和锁
    Mysql命令大全
    mysql keepalived
    mysql主从复制
    mysql从binlog恢复数据
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220179.html
Copyright © 2011-2022 走看看