الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Frm-40735 Unhandled Exception Ora-00001

Featured Replies

بتاريخ:

السلام على اهل السلام
كيف الصحة
ان شاء الله الكل بخير

شوفو اليوم انا عملت باتون فيها هذا الكود

declare
	-- sold quantity for book A in export B
cursor sold is select sum(nvl(b.RcpDtlQty,0)) sold1,c.expcde expcde, c.expbok bok 
								from krcpdtat a,krcpdtlt b, kexpbokt c
								where a.rcpcde=b.rcpdtlcde and a.rcpint=b.rcpdtlint and a.rcpcnlflg is null and a.rcpprtflg is not null and b.rcpexpcde=c.expcde and b.rcpdtlbok=c.expbok
								group by c.expcde, c.expbok;
								
								
exported_cur kexpbokt.expqty%type;
 returned_cur krtnstrt.RTNQTY%type;     
 remain_cur kexpbokt.expqtyrmn%type;
 
 expcde_cur kexpbokt.expcde%type;
 bok_cur    kexpbokt.expbok%type;
 sold_cur number(6):=0;
   
							
begin --choose sold books that satified the condition : export-rtn<sold+rmn
								
for x in sold
loop
 expcde_cur:=x.expcde;
 bok_cur:= x.bok;
 sold_cur:=x.sold1;
 
 
--remaining
 select nvl(a.expqtyrmn,0) into remain_cur from kexpbokt a 
 where a.expcde =expcde_cur and a.expbok= bok_cur;
 
 --returned
 select nvl(sum(a.rtnqty),0) into returned_cur from krtnstrt a 
 where a.rtnexpcde =expcde_cur and a.rtnbok=bok_cur;
 
 --export
 select nvl(a.expqty,0) into exported_cur from kexpbokt a 
 where a.expcde =expcde_cur and a.expbok=bok_cur;
 
 
 if (exported_cur-returned_cur)<(remain_cur+sold_cur) then

 update kexpbokt a 
 set a.expqty =(returned_cur+remain_cur+sold_cur)
 where a.expcde=expcde_cur and a.expbok =bok_cur;
   
 insert into book1 values(bok_cur,expcde_cur);
   
 end if;
 
end loop;
commit;


end;



ركزو علىالكيرسور

cursor sold is select sum(nvl(b.RcpDtlQty,0)) sold1,c.expcde expcde, c.expbok bok 
								from krcpdtat a,krcpdtlt b, kexpbokt c
								where a.rcpcde=b.rcpdtlcde and a.rcpint=b.rcpdtlint and a.rcpcnlflg is null and a.rcpprtflg is not null and b.rcpexpcde=c.expcde and b.rcpdtlbok=c.expbok
								group by c.expcde, c.expbok;



انا كنت مسويتها بدل
sum(nvl(b.RcpDtlQty,0)
كنت حاطة count (*)
بس لما غيرتها الى السام
صاؤ يطلع لي هذا الخطأ

frm-40735 unhandled exception ORA-00001

ولما اقوله ديسبلي ارور
يقولي نو ارور
:)

احد يعرف ليش
او اش اسوي
؟؟

بتاريخ:

السلام عليكم
طيب جربي اكتبي بنهاية الكود EXECPTION كالتالي:

EXECPTION WHEN OTHERS THEN
NULL;


ان استمر الخطأ.. ارفق الفورم والجدول...

تم تعديل بواسطة PALI.ORACLE

بتاريخ:

this error of primary key violation or unique value

بتاريخ:

اخي العزيز كما قال الاخ maher المشكلة هي ORA-00001: unique constraint violated

ومعنى ذلك انه لا يوجد لديك اي مشكلة في الكيرسر ولكن المشكلة اما في عملية الـ update او في عملية الـ insert

حيث قوم بتعديل قيمة تحتوي على قيد فريد (unique) الى قيمه موجوده اصلا
او تقوم بعمل اضافة سجل واسناد قيمه لاحد هذه الحقول التي تحتوي ايضا على قيد فريد (unique) بقيمه موجوده مسبقا

لكن لمذا ظهر الخطأ عند تعديل العملية من count الى sum
يعزى السبب بتغير نتيجة الكيرسر وكما يوجد في النهاية شرط يحدد عمليه الـ update والـ insert وفي هذه الحالة تحقق الشرط فقام بتطبيق ما بهى وظهر الخطأ

بتاريخ:
  • كاتب الموضوع

تشكراتي لكم جميعا

وجزاكم الله الف خير

فعلا لما شلت جملة الانسرت لما شلتها اشتغلت

:) اممم وبس

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.