Last active
October 2, 2023 16:51
-
-
Save garrettdieckmann/792569c596945496eb17 to your computer and use it in GitHub Desktop.
Update PSPCMPROG.LASTUPDOPRID back to 'PPLSOFT' for any object delivered within a specific Project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Update value of PSPCMPROG.LASTUPDOPRID to 'PPLSOFT' for all PeopleCode that was copied into the database */ | |
/* within a specific project (&projectname). */ | |
-- NOTE/UPDATE: Due to discrepencies in how the objectvalues are populated between the PSPROJECITEM and PSPCMPROG records, this SQL will NOT correctly update the PSPCMPROG record. | |
update sysadm.pspcmprog pcode set pcode.lastupdoprid = 'PPLSOFT' where pcode.rowid in | |
(select pc.rowid | |
from pspcmprog pc | |
, psprojectitem pi | |
where pc.objectid1 = pi.objectid1 | |
and pc.objectvalue1 = pi.objectvalue1 | |
and pc.objectid2 = pi.objectid2 | |
and pc.objectvalue2 = pi.objectvalue2 | |
and pc.objectid3 = pi.objectid3 | |
and pc.objectvalue3 = pi.objectvalue3 | |
and pc.objectid4 = pi.objectid4 | |
and pc.objectvalue4 = pi.objectvalue4 | |
/* all types of PeopleCode */ | |
and pi.objecttype in ('8','9','39','40','41','42','43','44','45','46','47','48','58') | |
/* only update PeopleCode that was actually copied */ | |
and pi.copydone = '1' | |
and pi.projectname = '&projectname'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment