بتاريخ: 17 أغسطس 200916 سنة comment_166929 هل يجوز عمل اثنين Exception بحيث اذا لم يجد داتا يقوم بعمل ؟؟؟ واذا وجد اكثر من row يقوم بعمل ؟؟؟؟؟begin SELECT hdr,srf,decode(n,0,'حضور',1,'بدون ختم حضور',2,'بدون ختم انصراف',3,'غياب'),name1 into :harak.a11,:harak.b11,:harak.c11,:harak.d11FROM YOMWHERE (DATE1 = :harak.date1) AND (NO1 = :harak.no1) AND (N <> 4);exceptionwhen no_data_found then:harak.a11:=null;:harak.b11:=null;:harak.c11:=null;:harak.d11:=null;end;;Exception when too_many_rows thenmessage('الرجاء مراجعة مسئول النظام');message('الرجاء مراجعة مسئول النظام');end; تقديم بلاغ
بتاريخ: 17 أغسطس 200916 سنة كاتب الموضوع comment_166930 begin SELECT hdr,srf,decode(n,0,'حضور',1,'بدون ختم حضور',2,'بدون ختم انصراف',3,'غياب'),name1 into :harak.a11,:harak.b11,:harak.c11,:harak.d11 FROM YOM WHERE (DATE1 = :harak.date1) AND (NO1 = :harak.no1) AND (N <> 4); exception when no_data_found then :harak.a11:=null; :harak.b11:=null; :harak.c11:=null; :harak.d11:=null; end; ; Exception when too_many_rows then message('الرجاء مراجعة مسئول النظام'); message('الرجاء مراجعة مسئول النظام'); end تقديم بلاغ
بتاريخ: 17 أغسطس 200916 سنة comment_166932 السلام عليكمنعم أخي يمكن ذلك..شوف المثال: BEGIN .. ... EXCEPTION WHEN NO_DATA_FOUND THEN STATMENT 1; WHEN OTHERS THEN STATMENT 2; END; بالتوفيق تم تعديل 17 أغسطس 200916 سنة بواسطة PALI.ORACLE تقديم بلاغ
بتاريخ: 18 أغسطس 200916 سنة comment_167106 السلام عليكم ورحمة الله وبركاتهاخي فاللهبعد التحيةكلام مظبوطقم بحذف كلمة exception التانية وان شاء الله هتشتغل begin SELECT hdr,srf,decode(n,0,'حضور',1,'بدون ختم حضور',2,'بدون ختم انصراف',3,'غياب'),name1 into :harak.a11,:harak.b11,:harak.c11,:harak.d11 FROM YOM WHERE (DATE1 = :harak.date1) AND (NO1 = :harak.no1) AND (N <> 4); exception when no_data_found then :harak.a11:=null; :harak.b11:=null; :harak.c11:=null; :harak.d11:=null; when too_many_rows then message('الرجاء مراجعة مسئول النظام'); message('الرجاء مراجعة مسئول النظام'); end تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.