Query to Delete Timesheet messages on PWA Home

Share on facebook
Share on twitter
Share on linkedin

insert  MSP_WEB_WORK_APPROVAL(
WASSN_ID,
WRES_ID,
WPRD_START_DATE,
WPRD_FINISH_DATE,
WRES_ID_APPROVER,
WAPPROVAL_STATUS,
WAPPROVAL_NOTIFICATION_SENT)
SELECT WASSN_ID,
WRES_ID,
WPRD_START_DATE,
WPRD_FINISH_DATE,
WRES_ID,
1,
0
FROM MSP_WEB_ASSIGNMENTS MWA, MSP_WEB_TIME_PERIODS mwp
WHERE Not Exists (select * from MSP_WEB_WORK_APPROVAL
where CONVERT(VARCHAR, CONVERT(DATETIME, WPRD_START_DATE), 110) = CONVERT(VARCHAR, CONVERT(DATETIME, MWP.WPRD_START_DATE), 110)
  AND CONVERT(VARCHAR, CONVERT(DATETIME, WPRD_FINISH_DATE), 110) = CONVERT(VARCHAR, CONVERT(DATETIME, MWP.WPRD_FINISH_DATE), 110)
  AND WASSN_ID = MWA.WASSN_ID
  AND WRES_ID = MWA.WRES_ID)

Go

UPDATE MSP_WEB_WORK_APPROVAL
SET WAPPROVAL_STATUS = ‘1’
WHERE WAPPROVAL_STATUS = ‘0’

go

Leave a Reply

Sign up for Softvative Newsletter

Receive the latest technology and leadership news and resources from us

Subscribe To Softvative Newsletter

Get notified about new articles

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest