Здравствуйте, имею вот такой sql
declare
cursor get_doc (v_orgid doc.createorgid%TYPE, v_doctypeid doc.doctypeid%TYPE) is
select a.docid from DOC a where a.CREATEORGID = v_orgid and a.doctypeid = v_doctypeid and a.createusername = 'Авто Т. Минздрав';
v_orgid doc.createorgid%TYPE;
v_doctypeid doc.doctypeid%TYPE;
v_docid doc.docid%TYPE;
v_user doc.createusername%TYPE;
BEGIN
SELECT a.doctypeid INTO v_doctypeid FROM doctype a WHERE a.systemname='EXP_InfoStateAssign';
select a.orgid into v_orgid from org a where a.SYSTEMNAME = '00100056';
open get_doc(v_orgid, v_doctypeid);
loop
exit when get_doc%NOTFOUND;
fetch get_doc into v_docid;
DELETE FROM ATTACH_DOC where DOCID = v_docid;
DELETE FROM DC_DOC_BASE where DOCID = v_docid;
delete from DC_EXP_InfoStateAssign where docid = v_docid;
delete from FS_INFODELIVREPOR_LIST where docid = v_docid;
delete from FS_PUBLICSERVIC_LIST where docid = v_docid;
delete from FS_INDEXQUALITY_LIST where docid = v_docid;
delete from FS_INFOINDVOLUME_LIST where docid = v_docid;
delete from FS_INFONPA_LIST where docid = v_docid;
delete from FS_INFOWORK_LIST where docid = v_docid;
delete from FS_RGZUSERTABLE_LIST where docid = v_docid;
delete from FS_RGZ_AGREER_LIST where docid = v_docid;
delete from DOC where docid = v_docid;
end loop;
close get_doc;
END;
/
Подскажите плиз, каким образом его реализовать в JDBC
.
Можно ли эту всю колбасню представить в виде сторки и передать в метод execute?
Дайте направление в какую сторону копать. Спасибо.