I want to create a Stored procedure for the
- documents whose
NStatusFlagshould not be equal to5and14
AND
also it should send Reminder to the respective user if the Document is with them for more than 3 days and if it is for more than 5 days then it should send it to its senior also
The date should be calculated with the U_datetime of the table and with the SYSTEM date from the system.
My NStatusFlag suggest which all documents are opened.
I tried below.
ALTER PROCEDURE GET_INWARD_REMINDER_REPORT
AS
BEGIN
Select * from inward_doc_tracking_trl
where NStatus_flag <> 5
and NStatus_flag <> 14
END
GO
SO I got all the documents which are opened, like below
But I am stuck how to get the all user by comparing with the date and send the reminders.
Also, I will get the Name of the USer with which the document is assigned from the inward_doc_tracking_hdr table.
NOTE inward_doc_tracking_hdr table mkey is related to ref_mkey from the inward_doc_tracking_trl table.
kindly help me out.
Aucun commentaire:
Enregistrer un commentaire