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

Except Friday Query

Featured Replies

بتاريخ:

hi all
i am trying to write query that discount the number of friday days between two days How ?

example
from_date = 21/10/2009
to_date = 2/11/2009

the result should be
(to_date - from_date ) - number of friday days between two days



thanks in advanced

بتاريخ:

السلام عليكم
you can try with this function

create or replace function fri_bet (date1 date,date2 date ) return number as day_bet number;
day number;
fri_count number :=0;
begin select date2-date1 into day_bet from dual;
for i in 1.. day_bet+1 loop
select to_char(date1-1+i,'d') into day from dual;
if day=7 then
fri_count:=fri_count+1;
end if;
end loop;
return(fri_count);
end;




the query

select fri_bet(to_date('30/10/09','dd/mm/yy'),to_date('06/11/09','dd/mm/yy')) from dual;



good luck

بتاريخ:

الله عليك مصطفى ،، استاذ :blink:

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

شكرا جزيلا لك يا اخ مصطفى
وجعل الله علمك هذا في ميزان حسناتك
مع خالص امنياتي وتحياتي
اخوك ماهر

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

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

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

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

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

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.