שלום לכולם
הכנסתי CHECK-FIELD טריגר למסך דיווחים בשדה "תקינים" ובו אני רוצה לעצור דיווחים אשר אין להם מלאי בייצור.
אני מקבל את השגיאה הבאה בשורה חמישית מהסוף.
* line 27: Type inappropriate for sign
+ line 27: Type inappropriate for sign
מה אני מפספס?
אשמח לעזרה.
להלן הקוד:
DECLARE C@ CURSOR FOR
SELECT KITITEMS.PART, PART.PARTNAME, :$.@ * (KITITEMS.QUANT /
SERIAL.QUANT), (KITITEMS.QUANT /
SERIAL.QUANT), KITITEMS.QUANT / SERIAL.QUANT, KITITEMS.KITFLAG,
(KITITEMS.QUANT – KITITEMS.ABALANCE)/1000,
SUM (ALINE.QUANT)/1000
FROM KITITEMS, SERIAL, PART, ALINE, ACT
WHERE KITITEMS.SERIAL = SERIAL.SERIAL
AND SERIAL.SERIALNAME = :$.SERIALNAME
AND KITITEMS.PART = PART.PART
AND KITITEMS.SERIAL = ALINE.SERIAL
AND ALINE.ACT = ACT.ACT
AND ACT.ACTNAME <> 'Releas'
GROUP BY 1, 2, 3, 4, 5, 6, 7;
OPEN C@;
LABEL 10;
FETCH C@ INTO :PART, :PARTNAME, :TO_ISSUE, :PORTION, :ZVAD,
:ISSUED, :ALINED;
GOTO 99 WHERE :RETVAL <= 0;
SELECT SUM(BALANCE) INTO :FLRBAL
FROM WARHSBAL, WAREHOUSES
WHERE :PART = WARHSBAL.PART
AND WARHSBAL.WARHS = WAREHOUSES.WARHS
AND WAREHOUSES.WARHSNAME = 'Flr';
:PAR1 = :PARTNAME;
ERRMSG 1500 WHERE :TO_ISSUE > :FLRBAL AND :$.@ > 0;
ERRMSG 1500 WHERE (:ALINE * :PORTION) + :TO_ISSUE > :ISSUED AND
:ZVAD = 'Y' AND :$.@ > 0;
LOOP 10;
LABEL 99;
CLOSE C@;