الانتقال إلى المحتوى
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.

مشكلة في التنفيذ

Featured Replies

بتاريخ:

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاته

تحية طيبة للجميع ، لقد قمت بقراءة الدروس الموجودة في قسم الدروس ضمن هذا القسم .. وقرأت درس واحد فقط وعندما أردت التطبيق واجهتني مشكلة ما وهي ..


لقد قمت بعمل جدول اسمه test فيه عمودين

ename varchar2(30)


والعمود الثاني

sal numer(7,2)


وقمت بهذا المثال الذي يعتمد على الجدول emp ويقوم بعمل زيادات على الرواتب على حسب تنصيف معين قمت به

وهذا هو البرنامج

declare

cursor c1 (v_last in number,v_first in number ) is
select ename,sal from emp
where sal between v_last and v_first ;

v_ename emp.ename%type;
v_sal emp.sal%type;

begin

open c1(1000,800);

loop
  fetch c1 into v_ename ,v_sal ;

  exit when c1%notfound;

  insert into test
  values(v_ename,v_sal*0.25)

END LOOP;

close c1;

open c1(2000,1001);

loop

  fetch c1  into v_ename ,v_sal ;

  exit when c1%notfound;

  insert into test
  values(v_ename,v_sal*0.20);

END LOOP;

close c1;

open c1(3000,2001);

loop
  fetch c1  into v_ename ,v_sal ;

  exit when c1%notfound;

  insert into test
  values(v_ename,v_sal*0.15);

END LOOP;

close c1;

open c1(4000,3001);

loop
  fetch c1  into v_ename ,v_sal ;

  exit when c1%notfound;

  insert into test
  values(v_ename,v_sal*0.10);

END LOOP;

close c1;

open c1(5000,4001);

loop
  fetch c1 into v_ename ,v_sal ;

  exit when c1%notfound;

  insert into test
  values(v_ename,v_sal*0.5);

END LOOP;

close c1;

exception

when no_data_found then

dbms_putout.put_line('No_data_found');

end ;
/


وتظهر لي الرسالة التالية

Input truncated to 1 characters
END LOOP;
*
ERROR at line 22:
ORA-06550: line 22, column 2:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
, ; return RETURNING_
The symbol ";" was substituted for "END" to continue.

!!!!!

فما هي المشكلة ؟
بتاريخ:

ممكن تبعت المشكلة في ملف تكست فيه الكود وإن شاء الله هعملهالك.
علشان اللغة عندي محولة شوية على الجهاز.

:ph34r:

بتاريخ:

مرفق نسخة مصححة من الكود
كان يوجد بعض اخطاء السنتاكس
مثل
dbms_output.put_line
و ليس
dbms_putout.put_line
و سيمي كولون ناقصة
و يوجد خطأ اخر في لوجيك البرنامج
في الكيرسور ضع القيمة الصغيرة قبل الكبيرة في شرط between...and

بالتوفيق

proc.txt

تم تعديل بواسطة hanon_OCP

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

السلام عليكم ورحمة الله وبركاته

ألف ألف ألف شكر يا شباب

ما قصرتوا :ph34r:

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

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

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

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

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

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.