Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. procedure insert_header(p_push_date in date,
  2. p_source_serial in varchar2,
  3. p_source_start_date in date,
  4. p_source_end_date in date
  5. ) is
  6.  
  7. id_temp number;
  8.  
  9. begin
  10. -- check for errors
  11. if p_push_date is null
  12. then
  13. result_code := 9213;
  14. --raise_application_error(-RESULT_CODE, 'push_date cannot be null');
  15. elsif p_source_serial is null
  16. then
  17. result_code := 9333;
  18. --raise_application_error(-RESULT_CODE, 'source_serial cannot be null');
  19.  
  20.  
  21. end if;
  22.  
  23. -- if there are no errors, do insert
  24. if result_code is null
  25. then
  26. -- fetch sequence number
  27. id_temp := header_seq.nextval;
  28. result_code:=0;
  29.  
  30. open o_cur_results for
  31. select id_temp as id
  32. from dual;
  33.  
  34. /*insert into*/
  35. end if;
  36.  
  37.  
  38.  
  39. commit;
  40.  
  41. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement