الانتقال إلى المحتوى

الرجاء المساعدة بsql


riad.baker

Recommended Posts

الرجاء المساعدة لأني أعمل على هذا المشروع


write another pl/sql block to store the salary of an employee in subsititution variable in the executable part of the program do the following

1-calculate the annul salary *12
2-calculate the bonus as indicated below:
3-if total sum >50,000 give the employee 15%
4-if total sum equal or greater than 30,000 and equal 50,000 give the employee 20%
5-display the amount of the bonus in the window in the following format:the bonus is $.... by using DBMS_OUTPUT.PUT_LINE

رابط هذا التعليق
شارك

أخي الفاضل ممكن توضيح السؤال اكثر

واعطاء بيانات اكثر واعطاء الجدول الذي يطبق عليه هذا السؤال

ويا ريت يكون السؤال بالعربي

رابط هذا التعليق
شارك

انا جربتها ع جدول ال employees ال ف سكيما hr

ودا ال فهمته من كلام حضرتك لو ف اى حاجة ياريت التوضيح

set serveroutput on declare
 sal employees.SALARY%type; 
 annual_sal employees.salary%type;
 comm       employees.commission_pct%type;
begin select salary,nvl(commission_pct,0) into sal,comm from employees 
 where employee_id=&emp;
 annual_sal:=(sal*12)+(comm*sal);
 if annual_sal>50000 then 
    annual_sal:=sal*0.15;
    dbms_output.put_line('the bonus is $ ' ||to_char(annual_sal));
 
 elsif annual_sal>=30000 or annual_sal=50000 then 
     annual_sal:=sal*0.20;
    dbms_output.put_line('the bonus is $' ||to_char(annual_sal));
  end if;
end;

تم تعديل بواسطة @nana@
رابط هذا التعليق
شارك

برمج كتلة لاسترداد الاسم وقسم البيع لكل موظف من الجدول (emp ) و فقط بالنسبة لأولئك الموظفين الذين رقمهم الوظيفي EMPID هو أقل من 7500.

* من القيم المستردة المطلوب حساب الرواتب السنوية لكل موظف وطباعتها باستخدام DBMS_OUTPUT.PUT_LINE. (استخدام حلقة)

* استخدام حلقة ، لاسترداد اسم الموظف و الراتب الجدول (emp) وعرضها في إطار ، وذلك باستخدام DBMS_OUTPUT.PUT_LINE.

اعرض هذه التفاصيل للموظفين ال 15 الأولى

تم تعديل بواسطة riad.baker
رابط هذا التعليق
شارك

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

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

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

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

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