Delegate - End Date Delegate for Inactive Delegates

 


To end date the delegat if assigned to inactive users

Update delegates set enddate=SYSDATE(), updatedate=SYSDATE(), updateuser=1 where delegatekey in (
select * from(
(select delegatekey from delegates d left join users u on d.userkey = u.userkey where u.statuskey=0 and d.enddate > sysdate()
UNION select delegatekey from delegates d left join users u on d.delegateuserkey = u.userkey where u.statuskey=0 and d.enddate > sysdate()) ) )


Comments

Popular posts from this blog

Enhanced Query - To Update Account Status and Name

Connection Config - STATUS_THRESHOLD_CONFIG

Email variables _ Register User