psi_mmobile

Untitled

Sep 23rd, 2020
727
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Person from provided screen
  2. SELECT * FROM person
  3. WHERE first_name = 'DANUT'
  4. AND last_name = 'BAMBO';--196176
  5.  
  6. --Every SOT record for the person with the corresponding date
  7. SELECT work_date, P_PERSON.IsDocumentValid(196176, 100, work_date) FROM social_office_transaction
  8. WHERE person_id = 196176
  9. ORDER BY 1 DESC;
  10.  
  11.  
  12. SELECT work_date, P_PERSON.IsDocumentValid(196176, 101, work_date) FROM social_office_transaction
  13. WHERE person_id = 196176
  14. ORDER BY 1 DESC;
  15.  
  16. SELECT work_date, P_PERSON.IsDocumentValid(196176, 102, work_date) FROM social_office_transaction
  17. WHERE person_id = 196176
  18. ORDER BY 1 DESC;
  19.  
  20. SELECT work_date, P_PERSON.IsDocumentValid(196176, 103, work_date) FROM social_office_transaction
  21. WHERE person_id = 196176
  22. ORDER BY 1 DESC;
  23.  
  24. SELECT work_date, P_PERSON.IsDocumentValid(196176, 104, work_date) FROM social_office_transaction
  25. WHERE person_id = 196176
  26. ORDER BY 1 DESC;
  27.  
  28. SELECT work_date, P_PERSON.IsDocumentValid(196176, 105, work_date) FROM social_office_transaction
  29. WHERE person_id = 196176
  30. ORDER BY 1 DESC;
  31.  
  32. SELECT work_date, P_PERSON.IsDocumentValid(196176, 106, work_date) FROM social_office_transaction
  33. WHERE person_id = 196176
  34. ORDER BY 1 DESC;
  35.  
  36. SELECT work_date, P_PERSON.IsDocumentValid(196176, 107, work_date) FROM social_office_transaction
  37. WHERE person_id = 196176
  38. ORDER BY 1 DESC;
  39.  
  40. SELECT work_date, P_PERSON.IsDocumentValid(196176, 108, work_date) FROM social_office_transaction
  41. WHERE person_id = 196176
  42. ORDER BY 1 DESC;
  43.  
  44. SELECT work_date, P_PERSON.IsDocumentValid(196176, 109, work_date) FROM social_office_transaction
  45. WHERE person_id = 196176
  46. ORDER BY 1 DESC;
  47.  
  48. --Checks for yesterday
  49. SELECT P_PERSON.IsDocumentValid(196176, 100, TRUNC (SYSDATE - 1) ) FROM dual;
  50. SELECT P_PERSON.IsDocumentValid(196176, 101, TRUNC (SYSDATE - 1) ) FROM dual;
  51. SELECT P_PERSON.IsDocumentValid(196176, 102, TRUNC (SYSDATE - 1) ) FROM dual;
  52. SELECT P_PERSON.IsDocumentValid(196176, 103, TRUNC (SYSDATE - 1) ) FROM dual;
  53. SELECT P_PERSON.IsDocumentValid(196176, 104, TRUNC (SYSDATE - 1) ) FROM dual;
  54. SELECT P_PERSON.IsDocumentValid(196176, 105, TRUNC (SYSDATE - 1) ) FROM dual;
  55. SELECT P_PERSON.IsDocumentValid(196176, 106, TRUNC (SYSDATE - 1) ) FROM dual;
  56. SELECT P_PERSON.IsDocumentValid(196176, 107, TRUNC (SYSDATE - 1) ) FROM dual;
  57. SELECT P_PERSON.IsDocumentValid(196176, 108, TRUNC (SYSDATE - 1) ) FROM dual;
  58. SELECT P_PERSON.IsDocumentValid(196176, 109, TRUNC (SYSDATE - 1) ) FROM dual;
RAW Paste Data