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

كتب cursor يعمل على زيادة الراتب بنسبة محددة لادارة محددة

Featured Replies

بتاريخ:

ارجو مساعدتي في حل السؤال .
السؤال :
اكتب cursor اسمه update_sal يعمل على زيادة
موظفي الدائرة (القسم) 10 بنسبة 10%
وموظفي الدائرة (القسم) 20 بنسبة 20%
وموظفي باقي الدوائر بنسبة 5% .
ارجو المساعدة...
ولكم جزيل الشكر ...
مشكوورين........

بتاريخ:

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

BEGIN FOR REC IN ( SELECT * FROM EMP )
LOOP
UPDATE EMP
SET SAL=SAL + ( SELECT DECODE ( REC.DEPT_NO , 10 ,REC.SAL * 10/100,20,REC.SAL * 20/100 , REC.SAL*5/100) FROM DUAL ) 
WHERE EMP_NO=REC.EMP_NO;
END LOOP;
COMMIT;
END;

بتاريخ:

SET SERVEROUTPUT ON DECLARE
 CURSOR  deb_cursor iS
  SELECT SAL ,DEPTNO , EMPNO
  from emp   ;
  v_sal    number(10,3)  ;
 x_DEPTNO       number(10);
 x_EMPNO          number(10);
BEGIN OPEN deb_cursor;
 LOOP
   FETCH deb_cursor INTO x_sal,x_DEPTNO,x_EMPNO ;
if x_DEPTNO =10 then
update emp set sal=x_sal*.10 where EMPNO =x_EMPNO ;
end if;
if x_DEPTNO =20 then
update emp set sal=x_sal*.20 where EMPNO =x_EMPNO ;
end if;
if x_DEPTNO >20 then
update emp set sal=x_sal*.5 where EMPNO =x_EMPNO ;
end if;
   EXIT WHEN deb_cursor%NOTFOUND;
   end loop ;
  CLOSE  deb_cursor;
end;

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

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

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

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

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.