Всем привет.
Oracle 11.2g
При выполнении данного запроса:
INSERT INTO t_doc2x7xrest
(restquantity,
restquantitycopy,
date_,
accounttype,
subaccantype,
subaccancode)
SELECT DISTINCT 0,
0,
CASE
WHEN relationtype IN
(SELECT docrelationtype
FROM cr_setupforaccrest
WHERE accounttype = :v_typeacc
AND isincrease = 1
AND subsystem = 1) THEN
docdate + 1
ELSE
docdate
END,
CASE
WHEN (subaccancode = 0 OR subaccancode = :v_natcurrcode) THEN
7
ELSE
17
END,
:i_subaccantype,
subaccancode
FROM cr_contractsdocrelations
WHERE contractid = :i_contractid
AND relationtype IN
(SELECT opertype
FROM cr_opertypesetup
WHERE (debetacctype = :v_typeacc OR creditacctype = :v_typeacc)
AND subsystem = 1)
AND subaccantype = :i_subaccantype
AND subaccancode = (CASE
WHEN :i_subaccantype = 0 THEN
subaccancode
ELSE
:i_subaccancode
END)
AND docdate BETWEEN :i_begindate - 1 AND :i_enddate
AND CASE
WHEN relationtype IN (SELECT docrelationtype
FROM cr_setupforaccrest
WHERE accounttype = :v_typeacc
AND isincrease = 1
AND subsystem = 1) THEN
docdate + 1
ELSE
docdate
END NOT IN (SELECT date_ FROM t_doc2x7xrest1)
;
Возникает:
ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], [], [], [], [], []
Я так понял это из-за SELECT date_ FROM t_doc2x7xrest1.