› פורומים › אפיון ופיתוח פריוריטי › הכפלת רשומות
- This topic has תגובה 1, 2 משתתפים, and was last updated לפני 3 שנים, 6 חודשים by yitzchok.
- Post
-
- מאי 22, 2021 בשעה 10:47 pm
שלום,בניתי מסך אב ובן עם טבלאות חדשות .
בעת הזנת נתונים במסך הבן אותם נתונים מועתקים לי עבור כל שורה במסך האב כלומר יש לי את אותם רשומות לכל שורה במסך האב שנמצא בטבלה נפרדת.
אני מסיקה שעשיתי חיתוך לא נכון אבל לא מוצאת איזה.
מעלה את הקובץ DUMP של המסך שמכפיל רשומות.
תודה!
FORM : MEND_DASUBPRICELIST
————————–
DECLARE FILL57497 CURSOR FOR
SELECT MEND_DASUBPRICELIST.CUSTYPE, MEND_DASUBPRICELIST.BUSECTOR,
MEND_DASUBPRICELIST.INDSECTOR, MEND_DASUBPRICELIST.INFSECTOR,
MEND_DASUBPRICELIST.AIRSECTOR, MEND_DASUBPRICELIST.COMSECTOR,
MEND_DASUBPRICELIST.DASUBPRICELIST
FROM MEND_DASUBPRICELIST
ORDER BY 1 ASCKEYS :
——
KEY 1 (A): DASUBPRICELIST
KEY 2 (U): CUSTYPEMEND_DASUBPRICELIST/INSERT TRIGGER:
———————————–
#line 1 MEND_DASUBPRICELIST/INSERT
SET TRANSACTION;
INSERT INTO MEND_DASUBPRICELIST ( CUSTYPE, BUSECTOR, INDSECTOR, INFSECTOR,
AIRSECTOR, COMSECTOR, DASUBPRICELIST)
VALUES ( :MEND_DASUBPRICELIST.CUSTYPE, :MEND_DASUBPRICELIST.BUSECTOR, :MEND_DASUBPRICELIST.INDSECTOR,
:MEND_DASUBPRICELIST.INFSECTOR, :MEND_DASUBPRICELIST.AIRSECTOR, :MEND_DASUBPRICELIST.COMSECTOR,
:MEND_DASUBPRICELIST.DASUBPRICELIST);SELECT 189 INTO :SCREENMSG FROM DUMMY WHERE :RETVAL = 0;
SELECT DASUBPRICELIST
INTO :MEND_DASUBPRICELIST.DASUBPRICELIST
FROM MEND_DASUBPRICELIST
WHERE CUSTYPE = :MEND_DASUBPRICELIST.CUSTYPE ;
:NEXTPATTERNFLAG = 0;
COMMIT;MEND_DASUBPRICELIST/UPDATE TRIGGER:
———————————–
#line 1 MEND_DASUBPRICELIST/UPDATE
SET TRANSACTION;
UPDATE MEND_DASUBPRICELIST
SET CUSTYPE = :MEND_DASUBPRICELIST.CUSTYPE ,
BUSECTOR = :MEND_DASUBPRICELIST.BUSECTOR ,
INDSECTOR = :MEND_DASUBPRICELIST.INDSECTOR ,
INFSECTOR = :MEND_DASUBPRICELIST.INFSECTOR ,
AIRSECTOR = :MEND_DASUBPRICELIST.AIRSECTOR ,
COMSECTOR = :MEND_DASUBPRICELIST.COMSECTOR
WHERE CUSTYPE = :MEND_DASUBPRICELIST1.CUSTYPE
AND ABSR(BUSECTOR – :MEND_DASUBPRICELIST1.BUSECTOR) < 0.1
AND ABSR(INDSECTOR – :MEND_DASUBPRICELIST1.INDSECTOR) < 0.1
AND ABSR(INFSECTOR – :MEND_DASUBPRICELIST1.INFSECTOR) < 0.1
AND ABSR(AIRSECTOR – :MEND_DASUBPRICELIST1.AIRSECTOR) < 0.1
AND ABSR(COMSECTOR – :MEND_DASUBPRICELIST1.COMSECTOR) < 0.1
AND DASUBPRICELIST = :MEND_DASUBPRICELIST1.DASUBPRICELIST ;SELECT (:RETVAL = 0 ? 190 : (:RETVAL < 0 ? 50 : 0)) INTO :SCREENMSG FROM
DUMMY ;
:NEXTPATTERNFLAG = 0;
COMMIT;MEND_DASUBPRICELIST/DELETE TRIGGER:
———————————–
#line 1 MEND_DASUBPRICELIST/DELETE
SELECT ENTMESSAGE('CHBS_SUBPRICELIST','F',0) INTO :PROGPARAM FROM DUMMY;
SELECT 94 INTO :PROGMSG
FROM CHBS_SUBPRICELIST WHERE (( (:MEND_DASUBPRICELIST.DASUBPRICELIST <>
0 AND DASUBPRICELIST = :MEND_DASUBPRICELIST.DASUBPRICELIST )
));SET TRANSACTION;
DELETE FROM MEND_DASUBPRICELIST
WHERE CUSTYPE = :MEND_DASUBPRICELIST1.CUSTYPE
AND ABSR(BUSECTOR – :MEND_DASUBPRICELIST1.BUSECTOR) < 0.1
AND ABSR(INDSECTOR – :MEND_DASUBPRICELIST1.INDSECTOR) < 0.1
AND ABSR(INFSECTOR – :MEND_DASUBPRICELIST1.INFSECTOR) < 0.1
AND ABSR(AIRSECTOR – :MEND_DASUBPRICELIST1.AIRSECTOR) < 0.1
AND ABSR(COMSECTOR – :MEND_DASUBPRICELIST1.COMSECTOR) < 0.1
AND DASUBPRICELIST = :MEND_DASUBPRICELIST1.DASUBPRICELIST ;SELECT (:RETVAL = 0 ? 191 : (:RETVAL < 0 ? 50 : 0)) INTO :SCREENMSG FROM
DUMMY ;
COMMIT;MEND_DASUBPRICELIST/CUSTYPE/POST-FIELD TRIGGER:
———————————————–
#line 1 MEND_DASUBPRICELIST/CUSTYPE/POST-FIELD
SET TRANSACTION ;
GOTO 9 WHERE :NEXTPATTERNFLAG = 1;
GOTO 9 WHERE " = :MEND_DASUBPRICELIST.CUSTYPE ;
GOTO 9 WHERE :MEND_DASUBPRICELIST.CUSTYPE = :MEND_DASUBPRICELIST1.CUSTYPE
;
SELECT BUSECTOR, INDSECTOR, INFSECTOR, AIRSECTOR, COMSECTOR,
DASUBPRICELIST
INTO :MEND_DASUBPRICELIST.BUSECTOR, :MEND_DASUBPRICELIST.INDSECTOR,
:MEND_DASUBPRICELIST.INFSECTOR, :MEND_DASUBPRICELIST.AIRSECTOR,
:MEND_DASUBPRICELIST.COMSECTOR, :MEND_DASUBPRICELIST.DASUBPRICELIST
FROM MEND_DASUBPRICELIST
WHERE CUSTYPE = :MEND_DASUBPRICELIST.CUSTYPE ;
LABEL 9 ;COMMIT;
MEND_DASUBPRICELIST/DASUBPRICELIST/POST-FIELD TRIGGER:
——————————————————
#line 1 MEND_DASUBPRICELIST/DASUBPRICELIST/POST-FIELD
SET TRANSACTION ;
GOTO 9 WHERE :NEXTPATTERNFLAG = 1;
GOTO 9 WHERE 0 = :MEND_DASUBPRICELIST.DASUBPRICELIST ;
GOTO 9 WHERE :MEND_DASUBPRICELIST.DASUBPRICELIST = :MEND_DASUBPRICELIST1.DASUBPRICELIST
;
SELECT CUSTYPE, BUSECTOR, INDSECTOR, INFSECTOR, AIRSECTOR, COMSECTOR
INTO :MEND_DASUBPRICELIST.CUSTYPE, :MEND_DASUBPRICELIST.BUSECTOR,
:MEND_DASUBPRICELIST.INDSECTOR, :MEND_DASUBPRICELIST.INFSECTOR,
:MEND_DASUBPRICELIST.AIRSECTOR, :MEND_DASUBPRICELIST.COMSECTOR
FROM MEND_DASUBPRICELIST
WHERE DASUBPRICELIST = :MEND_DASUBPRICELIST.DASUBPRICELIST ;
LABEL 9 ;COMMIT;
- Replies
- יש להתחבר למערכת על מנת להגיב.