Powered By Blogger

শনিবার, ১৭ জুন, ২০১৭

Procedure for System Record of Timestapping (created time)

PROCEDURE P_RecordHistory IS
  curr_block varchar2(30) := name_in('system.trigger_block');
  rec_status varchar2(10) := name_in('system.record_status');
BEGIN
    if rec_status = 'INSERT' then
        if not id_null(find_item(curr_block||'.'||'SS_CREATOR')) then
            copy(name_in('global.g_emp_no'), curr_block||'.'||'SS_CREATOR');
        end if;
        if not id_null(find_item(curr_block||'.'||'SS_CREATED_ON')) then
            copy(to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'), curr_block||'.'||'SS_CREATED_ON');
        end if;
    elsif rec_status = 'CHANGED' then
        if not id_null(find_item(curr_block||'.'||'SS_MODIFIER')) then
            copy(name_in('global.g_emp_no'), curr_block||'.'||'SS_MODIFIER');
        end if;
        if not id_null(find_item(curr_block||'.'||'SS_MODIFIED_ON')) then
            copy(to_char(sysdate,'DD-MON-YYYY HH24:MI:SS'), curr_block||'.'||'SS_MODIFIED_ON');
        end if;
    end if;
    if not id_null(find_item(curr_block||'.'||'SS_OG_ON')) then
        copy(k_variable.og_no, curr_block||'.'||'SS_OG_ON');
    end if;
END;

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Row-level “Add” icon using a virtual column (APEX-safe)

1️⃣ Enable Insert in the Interactive Grid IG → Attributes Edit → Allowed Add Row → Yes 2️⃣ Add a New Column (Icon column) Column...