dream maker بتاريخ: 8 مايو 2010 تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 يا جماعة ساعدوني بحلهم بليز لازمني الحل اليوم جزاكم الله الخير ساعدوني بحلهم -Create pL\sql block to declare a cursor EMP_CUR to select the employee_id , first_name,last_name,Salary,hire_date.for all employees works in any department that is name start with ‘c’.process each row from the cursor, and if the salary greater than 15000 and hire_date is greater than 01-feb-1988 display the last_ name salary and hire_date.2create pL\sql block to declare a cursor date_cur to select the employee_id, first_name,last_name,salary for employees whose hire_date is less than 01-mar-2000,Process each row from the cursor and if the salary is less than or equal 15000.rais an exception .handle the exception with appropriate exception handler thatinsert values into error_table: employee_id,salary.otherwise display “thank you for your effort”. 0 اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Abdallah.Hasan بتاريخ: 8 مايو 2010 تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 (معدل) السلام عليكم أخيحل السؤال الأول declare cursor EMP_CUR is select e.employee_id as employee_id , e.first_name as first_name , e.last_name as last_name, e.Salary as Salary, e.hire_date as hire_date, d.department_no from empolyees e, departments d where e.department_no = d.department_no and d.department_name like 'c%'; begin for rec_1 in emp_cur loop if rec_1.salary > 15000 and rec_1.hire_date > to_date('01-feb-1988','dd-mon-yyyy') then dbms_output.put_line (' Last Name ' || rec_1.last_name || ' Salary ' || rec_1.salary || ' Hire Date ' || rec_1.hire_date); end if; end loop; end; حل السؤال الثاني declare salary_exp EXCEPTION; cursor EMP_CUR is select employee_id , first_name , last_name , Salary from empolyees where hire_date < to_date('01-mar-2000','dd-mon-yyyy'); begin for rec_1 in emp_cur loop if rec_1.salary <= 15000 then RAISE salary_exp; else dbms_output.put_line ('thank you for your effort'); end if; end loop; EXCEPTION WHEN salary_exp THEN insert into error_table (employee_id,salary) values (rec_1.employee_id, rec_1.salary); commit; end; تم تعديل 8 مايو 2010 بواسطة ahasan اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
dream maker بتاريخ: 8 مايو 2010 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 مششكوووور كتتتتير اخويبس بدي اسال انتى متأكد من الجابة لانه كتير مهم في عندي سؤال تاني عادي اسألك اياهيعطييييك الف عافية وما قصرت اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Abdallah.Hasan بتاريخ: 8 مايو 2010 تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 مششكوووور كتتتتير اخويبس بدي اسال انتى متأكد من الجابة لانه كتير مهم في عندي سؤال تاني عادي اسألك اياهيعطييييك الف عافية وما قصرت ان شاء الله أخوي لكن .. طبقها انت واتأكد بنفسك ... عشان تتقن كتابة الاكواد واسال اخوي .. وان شاء الله اذا قدرت اساعدك ما بقصر معك اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
dream maker بتاريخ: 8 مايو 2010 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 مشكور اخوي هاد هوا السؤال create PL/SQL block to print number of employees work in department_id=30? اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Abdallah.Hasan بتاريخ: 8 مايو 2010 تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 السلام عليكم اخووياخوووي ... انا ان شاء الله رح احل السؤال ... بس بتمنى منك انت تحاول عشان تتقن كتابة الكود declare v_count number; begin select count(1) into v_count from from employees where department_id = 30; dbms_output.put_line ('The number of employees who work in department_id=30 ' || v_count); exception when no_data_found then null; end; بالتوفيق اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
dream maker بتاريخ: 8 مايو 2010 كاتب الموضوع تقديم بلاغ مشاركة بتاريخ: 8 مايو 2010 ان شاالله اخوي بحاااول مشكوووووووور اقتباس رابط هذا التعليق شارك المزيد من خيارات المشاركة
Recommended Posts
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.