بتاريخ: 5 مايو 200817 سنة comment_128091 السلام عليكماخباركم؟ان شاءالله بخيرياطويلن العمر والسلامهانا عندي مشكله في الداتا بيس الي مسويتهاهي صح كجداول وترابطبس سويت عليها بروسيدجر يشيك على بعض القيموتكون البروسيدجر بسلامه وقال مافيني ايروربس اذا استدعيته يعيي يطلع اوت بوت يقول ايروروانا ضاقت حيلتياالي بيطوله باله معي وبيحاول يعدل الايروروالا يفهمني غلطييعلمني اعطيه كل ابو شياتمنى تردون علي باسرع وقتلان التسليم السبتوهذي البروسيدجرز CREATE OR REPLACE PROCEDURE fill ISCURSOR c isselect s.SECTIONNUM,s.DAY,s.LECTURE,c.DATEFINAL,c.COURSEID,p.PREREQUEST1,p.PREREQUEST2from SCHEDUALED s,COURSESE c,PREQUEST p,temp1 twhere c.COURSEID=s.COURSEID and p.COURSEID=c.COURSEID and c.COURSEID=t.COURSEID and s.SECTIONNUM=t.SECTIONNUM;i varchar2(20);d varchar2(20);s varchar2(20);l varchar2(20);f varchar2(20);p1 varchar2(20):='';p2 varchar2(20):='';BEGIN open c;loopexit when c%notfound;fetch c into i,s,f,p1,p2,l,d; insert into temp2 values(i,s,f,p1,p2,l,d);end loop;close c;end;/=====================================CREATE OR REPLACE PROCEDURE checkfISCURSOR c1 isselect COURSEID,DATEFINALfrom temp2; i varchar2(20);f varchar2(20);CURSOR c2 isselect COURSEID,DATEFINALfrom temp2; i2 varchar2(20);f2 varchar2(20);BEGIN open c1;loopexit when c1%notfound;fetch c1 into i,f; open c2;loop exit when c2%notfound; fetch c2 into i2,f2; if i<>i2 then if f=f2 then dbms_output.put_line('=ERROR= there is overlap in date of final between -'||i||'- and -'||i2); dbms_output.put_line('you cant register'||i2); DELETE FROM temp2 WHERE courseID=i2; DELETE FROM temp1 WHERE courseID=i2; end if; end if;end loop;end loop;close c1;close c2;end;/========================================CREATE OR REPLACE PROCEDURE checklISCURSOR c1 isselect COURSEID,SECTIONNUM,DAY,LECTUREfrom temp2; i varchar2(20);d varchar2(20);s varchar2(20);l varchar2(20);CURSOR c2 isselect COURSEID,SECTIONNUM,DAY,LECTUREfrom temp2; ix varchar2(20);dx varchar2(20);sx varchar2(20);lx varchar2(20);BEGIN open c1;loopexit when c1%notfound;fetch c1 into i,s,d,l; open c2;loop exit when c2%notfound; fetch c2 into ix,sx,dx,lx; if i<>ix then if d=dx then if l=lx then dbms_output.put_line('=ERROR= there is overlap in lecture time between -'||i||'- section -'||s||'- and -'||ix||'- sction -'||sx); dbms_output.put_line('you cant register'||ix); DELETE FROM temp2 WHERE courseID=ix; end if; end if; end if;end loop;end loop;close c1;close c2;end;/=====================================CREATE OR REPLACE PROCEDURE checkp1p2ISCURSOR c1 isselect COURSEID,prerequest1,prerequest2from temp2; i varchar2(20);p1 varchar2(20):='';p2 varchar2(20):='';CURSOR c2 isselect COURSEID,prerequest1,prerequest2from temp2; ix varchar2(20);px1 varchar2(20):='';px2 varchar2(20):='';BEGIN open c1;loopexit when c1%notfound;fetch c1 into i,p1,p2; open c2;loop exit when c2%notfound; fetch c2 into ix,px1,px2; if i<>ix then if i=px1 then dbms_output.put_line('=ERRORE= you are trying to register -'||i||'- with its pre request -'||px1); dbms_output.put_line('you cant register'||px1); DELETE FROM temp2 WHERE courseID=px1; end if; if i=px2 then dbms_output.put_line('=ERRORE= you are trying to register -'||i||'- with its pre request -'||px2); dbms_output.put_line('you cant register'||px2); DELETE FROM temp2 WHERE courseID=px2; end if; end if;end loop;end loop;close c1;close c2;end;/كـود SQL [/sql] واضفت للداتا بيس جدولين عشان يساعدوني CREATE TABLE temp1 ( courseID varchar(20) not null,sectionnum int not null); CREATE TABLE temp2 ( courseID varchar(20) not null, sectionnum int not null,datefinal varchar(20), prerequest1 varchar(40),prerequest2 varchar(40), lecture int,day varchar(20)); [sql] نسيت اقول لكم وضيفت هذي البروسيدجرات تتاكن ان مافيه تعارض في المحاضراتاو امتحان الفاينلاو المواد المتطلبهوسلام ______.doc تقديم بلاغ
بتاريخ: 7 مايو 200817 سنة comment_128201 Hi ThereCan you please tell me whats the error code and message and what procedure give the error, and if possible can u produce a full script for all tables and procedures involved here to try to trace the error.with my best wishes. تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.