CREATE PROCEDURE "demoadm".p_perskto( pv_mandant char(2), pv_pkto char(15), pv_jahr decimal(4,0), pv_periode decimal(2,0), pv_soll decimal(13,2), pv_haben decimal(13,2) ) DEFINE err_sql int; DEFINE err_isam int; DEFINE err_txt varchar(160,0); -- IF (pv_soll = 0.0) AND (pv_haben = 0.0) AND (pv_periode <> 0) THEN -- RETURN; -- END IF BEGIN ON EXCEPTION SET err_sql, err_isam, err_txt INSERT INTO DWE_perskto VALUES (0,err_sql,err_isam,err_txt,0,'sr_sh_pkto', 'I', pv_mandant, pv_pkto, pv_jahr, pv_periode, pv_soll, pv_haben ); SET LOCK MODE TO NOT WAIT; END EXCEPTION SET LOCK MODE TO WAIT 10; INSERT INTO sr_sh_pkto ( mandant, pkto_nr, jahr, periode, soll, haben ) VALUES ( pv_mandant, pv_pkto, pv_jahr, pv_periode, pv_soll, pv_haben ); SET LOCK MODE TO NOT WAIT; END END PROCEDURE
HTML-Autor: Rohloff, Datenbank: demodb, Datenstand: 31.05.00 17:07