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

بتاريخ:

أرجوا منكم يا اخواني ان تساعدوني في الاستعلامين التاليين من HR schema




الاول : اعطيني كل قسم كم فيه عدد وظائف (بإستخدام Distinct) ؟





الثاني : اعطيني أول يوم اثنين بعد ستة أشهر كتابة ؟




شاكر لكم حسن تعاونكم

بتاريخ:

ده اجابه السؤال التانى معلش مش عندى اتش ار سكيما وغير السبت لليوم اللى انت عاوزه

SELECT
     next_day(add_months (trunc(sysdate,'year'),6),'السبت')
from  dual;

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

مشكور على الحل يا اخويا احمد
جزاك الله خير وكتبه في ميزان حسناتك

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

ده اجابه السؤال التانى معلش مش عندى اتش ار سكيما وغير السبت لليوم اللى انت عاوزه

SELECT
next_day(add_months (trunc(sysdate,'year'),6),'السبت')
from dual;




يا اخي احمد انا قمت بتجربة الكيوري السابق
والنتيجة انه اعطاني التاريخ المطلوب ولكن ارقام
فهل اقدر اطلع النتيجة كتابة بدل من الارقام
وشكرا

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

بتاريخ:

لو قصدك كده يبقى ده الكود

TO_CHAR(NEXT_DAY(ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),6),'السبت'),'DAY-MONTH-YEAR')
-------------------------------------------------------------------------------
السبت -يوليو -Twenty Thirteen





SELECT
to_char(next_day(add_months (trunc(sysdate,'year'),6),'السبت'),'Day-Month-Year')
from dual;

تم تعديل بواسطة ahmed.arafa

  • بعد 4 أسابيع...
بتاريخ:



create or replace procedure emp_procedure
(dept_id in employees.department_id %type)
is
cursor dept_cursor is select department_id from employees where department_id = dept_id;
dept_records dept_cursor %rowtype;
cursor emp_cursor is select count(*) total_jobs from
(select distinct job_id from employees where department_id = dept_id) ;
emp_records emp_cursor %rowtype;
begin
open emp_cursor ;
open dept_cursor ;
loop
fetch emp_cursor into emp_records ;
exit when emp_cursor %notfound ;
fetch dept_cursor into dept_records;
exit when dept_cursor %notfound;

dbms_output.put_line ('the department number is '||' '||dept_records.department_id || ' and total jobs in that department is'||' '||emp_records.total_jobs) ;
end loop;
end emp_procedure ;
/
show errors procedure emp_procedure;/
create or replace procedure emp_procedure_1
is
cursor emp_cursor is select distinct department_id from employees where department_id is not null ;
emp_records emp_cursor %rowtype;
begin
open emp_cursor ;
loop
fetch emp_cursor into emp_records ;
exit when emp_cursor %notfound ;
emp_procedure (emp_records.department_id);
end loop;
end emp_procedure_1 ;
/
begin
emp_procedure_1;
end;

بتاريخ:

select count(*) , department_id from
(select distinct job_id , department_id from employees)
where department_id is not null
group by department_id order by department_id
excute it


1 10
2 20
2 30
1 40
3 50
1 60
1 70
2 80
2 90
2 100
2 110
;

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

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

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

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

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

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.