REFERENCE Ticket: #1051419
Description:
Queries:
Below are the 3 tables that impact the status of a transferee file in iZone
--search by member projectid to get the status of projstatus
select * from trmaster where projectid = 'CSC 202000370'
--search by member projectid to list the closedate
select * from trnfact where projectid = 'CSC 202000370'
--search by member projectid to check the closed_date
select * from projstat where projectid = 'CSC 202000370'
Resolution:
-- This script will update the projectstatus to open, remove the closed_dt and update the closed_dt/wrkshft_dt, the opid value should be the first initial and last name of the app support engineer who created the script for the data fix
use irp
begin tran
update trmaster
set closed_dt = NULL, projstatus = 'O', update_dt = getdate(), opid = 'slumbania'
--select * from trmaster
where projectid = 'CSC 202000370'
if @@ERROR > 0 or @@ROWCOUNT <> 1
BEGIN
ROLLBACK TRAN
RETURN
END
update trnfact
set closed_dt = NULL, update_dt = getdate(), opid = 'slumbania'
--select * from trnfact
where projectid = 'CSC 202000370'
if @@ERROR > 0 or @@ROWCOUNT <> 3
BEGIN
ROLLBACK TRAN
RETURN
END
update projstat
set closed_dt = NULL, wrkshtf_dt = NULL, update_dt = getdate(), opid = 'slumbania'
--select * from projstat
where projectid = 'CSC 202000370'
if @@ERROR > 0 or @@ROWCOUNT <> 1
BEGIN
ROLLBACK TRAN
RETURN
END
commit tran