Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. CREATE OR REPLACE FUNCTION ORGPOLV2.resize_img (i_cod_op INTEGER)
  2. RETURN blob
  3. IS
  4. v_photo blob ;
  5. BEGIN
  6.  
  7. select img_simbolo_op
  8. into v_photo
  9. from tbl_op
  10. where cod_op=i_cod_op for update;
  11.  
  12. ordimage.process(v_photo, 'maxScale=32 32');
  13.  
  14. update tbl_op set img_simbolo_op = v_photo where cod_op=0;
  15. --
  16. commit;
  17.  
  18. select img_simbolo_op
  19. into v_photo
  20. from tbl_op
  21. where cod_op=0;
  22.  
  23.  
  24. RETURN v_photo;
  25. END resize_img;
  26. /
  27.  
  28. ORA-14551: cannot perform a DML operation inside a query
  29. ORA-06512: at "RESIZE_IMG", line 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement