-
-
Notifications
You must be signed in to change notification settings - Fork 244
Description
Hi *!
SELECT lit.gl_fk_tetel14_cpy_run_with_ex(15021, 15021, 'KA', null, null, 'N') FROM rdb$database
This call builds this SELECT :
SELECT t.fkisz_id, t.nyitzar, t.ervdat, t.bizonylat, t.szoveg,
t.szla, t.szla2, t.minosit1, t.minosit2, t.minosit3, t.minosit4, t.minosit5, t.minosit6,
t.eszla, t.eszla2, t.eminosit1, t.eminosit2, t.eminosit3, t.eminosit4, t.eminosit5, t.eminosit6,
t.tartozik, t.kovetel, t.mertek, t.megyseg, t.emertek, t.emegyseg, t.dertek, t.dnem, t.edertek, t.ednem,
t.alrkod, t.gytip, t.gysor, t.ugyf_id, t.kod1, t.kod2, t.kod3, t.kod4, t.kod5,
(SELECT ubt.id FROM pu_btet ubt WHERE ubt.pbiz_id = 15021 AND ubt.gysor = bt.gysor)
FROM pu_btet bt
INNER JOIN pu_biz b ON b.id = bt.pbiz_id
LEFT OUTER JOIN fk_buftet t ON t.alrsor = bt.id
WHERE bt.pbiz_id = 15021 AND
t.tabla = IIF(b.igaz = 'F', 'FK_TETEL', 'FK_BUFFER') AND
t.alrsor IS NOT NULL
FB30 plan
PLAN (T EV INDEX (PU_EV_KONYV_FK1))
PLAN (T FK_TETEL INDEX (PU_EV_KONYV_FK2))
PLAN (T FK_BUFFER INDEX (KT_EV_KTBT_FK_FK2, KT_EV_KTBT_FK_FK4, KT_EV_KTBT_FK_FK3, KT_EV_KTBT_FK_FK5))
PLAN (T KP INDEX (KAPENZTAR_FK2))
PLAN (UBT INDEX (PU_BTET_UK))
PLAN JOIN (JOIN (B INDEX (PU_BIZ_PK), BT INDEX (PU_BTET_BIZ_FK)), T FK_BUFFER INDEX (FK_BUFFER_ALRSOR), T FK_TETEL INDEX (FK_TETEL_ALRSOR))
FB40 plan
PLAN (T EV INDEX (PU_EV_KONYV_FK1))
PLAN (T FK_TETEL INDEX (PU_EV_KONYV_FK2))
PLAN (T FK_BUFFER INDEX (KT_EV_KTBT_FK_FK2, KT_EV_KTBT_FK_FK4, KT_EV_KTBT_FK_FK3, KT_EV_KTBT_FK_FK5))
PLAN (T KP INDEX (KAPENZTAR_FK2))
PLAN (UBT INDEX (PU_BTET_UK))
PLAN JOIN (JOIN (B INDEX (PU_BIZ_PK), BT INDEX (PU_BTET_BIZ_FK)), T FK_BUFFER INDEX (FK_BUFFER_ALRSOR), T FK_TETEL INDEX (FK_TETEL_ALRSOR))
FB50 (1121) plan
PLAN (T EV INDEX (PU_EV_KONYV_FK1))
PLAN (T FK_TETEL INDEX (PU_EV_KONYV_FK2))
PLAN (T FK_BUFFER INDEX (KT_EV_KTBT_FK_FK2, KT_EV_KTBT_FK_FK4, KT_EV_KTBT_FK_FK3, KT_EV_KTBT_FK_FK5))
PLAN (T KP INDEX (KAPENZTAR_FK2))
PLAN (UBT INDEX (PU_BTET_UK))
PLAN JOIN (JOIN (T FK_BUFFER NATURAL, T FK_TETEL NATURAL, BT INDEX (PU_BTET_PK)), B INDEX (PU_BIZ_PK))
Also on 50
SELECT lit.gl_fk_tetel14_cpy_run_with_ex(15021, 15021, 'KA', null, null, 'N') FROM rdb$database
sometimes inserts more than 1 record
java.lang.RuntimeException: exception 23; GL_EXCEPTION_EX; 3. könyvelés INSERT a 11/PKEZI/2017 bizonylathoz; At function 'EX.EX' line: 33, col: 5
At trigger 'FK_BUFFER_AI_PU_BIZ_BIU1__052' line: 16, col: 12
At procedure 'FK_BOV_WRITE14' line: 81, col: 5
At procedure 'FK_BOV14' line: 256, col: 5
At procedure 'GL_FK_TETEL14_CPY' line: 151, col: 3; At function 'LIT.GL_FK_TETEL14_CPY_RUN_WITH_EX' line: 336, col: 9 [SQLState:HY000, ISC error code:335544517]
jdbc:firebirdsql:172.16.173.98/3050:c:\Libra3sTesztRendszer\data\libra3sdbteszt_fulldb.gdb3s
select lit.gl_fk_tetel14_cpy_run_with_ex(15021, 15021, 'KA', null, null, 'N')
from rdb$database
I can send the FTP details for database on request.