CHK:",$CHK;
$STAT = 'Y';
if ($CHK eq 'on') { $STAT = 'N'; }
$sql_cmd = "
update genfin_dbo.t285_sec_cntl
set db_appr_d = '$SYSD1'
, db_appr_t = '$SYSD2'
, db_appr_x = '$LOGON'
, db_stat_c = '$STAT'
where f_fyqtr = '$FYQTR'
AND a_uid_c = '$UID'
AND ((a_uid_c = '$LOGON')
OR EXISTS ( select * from genfin_dbo.t285_sec_grp b
where t285_sec_cntl.f_fyqtr = b.f_fyqtr
and t285_sec_cntl.a_grp_x = b.a_grp_x
and (b.a_uid1_c = '$LOGON'
or b.a_uid2_c = '$LOGON')) )
";
#print "cmd:",$sql_cmd;
#exit;
$stmt = $dbh->prepare("
$sql_cmd
") or DBI::errstr;
$stmt->execute;
$ix1++;
} while (($ix1) ne $input{'SCTR'} && ($ix1 ne 1000));
$MSG1 = $F1R." RECORDS WERE UPDATED ";
} ## end one-by-one
##
| |