Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Person from provided screen
- SELECT * FROM person
- WHERE first_name = 'DANUT'
- AND last_name = 'BAMBO';--196176
- --Every SOT record for the person with the corresponding date
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 100, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 101, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 102, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 103, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 104, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 105, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 106, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 107, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 108, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- SELECT work_date, P_PERSON.IsDocumentValid(196176, 109, work_date) FROM social_office_transaction
- WHERE person_id = 196176
- ORDER BY 1 DESC;
- --Checks for yesterday
- SELECT P_PERSON.IsDocumentValid(196176, 100, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 101, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 102, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 103, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 104, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 105, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 106, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 107, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 108, TRUNC (SYSDATE - 1) ) FROM dual;
- SELECT P_PERSON.IsDocumentValid(196176, 109, TRUNC (SYSDATE - 1) ) FROM dual;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement