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

لمنع تداخل التواريخ في البلوك الفرعي عند الادخال Date Overlopping Is not Prmitted

Featured Replies

بتاريخ:

لمنع تداخل التواريخ في البلوك الفرعي عند الادخال


date overlopping is not prmitted


in details block



لدينا جدولين





master



create table itemss (item_code number(5),name varchar2(50),constraint pk_itemss primary key (item_code) );




Detail



create table prices (price_code number(5) ,date_from


date , date_to date , price number (5) , item_code number(5) );

alter table prices add constraint pk_prices primary key (price_code)
alter table prices add constraint fk_prices foreign key (item_code) references itemss (item_code);




[/center]

وهذه صورة البلوكين على الفورم






مع العلم ان كل صنف


item


له اكثر من سعر بختلاف التاريخ


والسوال




كيف يمكن منع تداخل التواريخ في البلوك الفرعي الاسعار


prices عند الادخال اسعار جديده



في الانتظار...

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

بتاريخ:

try write below code in WHEN-VALIDATE-RECORD trigger at block prices




declare
ln$count_exists number;
begin

select count(1)
into ln$count_exists
from prices
where item_code = :prices.item_code
and
(:prices.date_from between date_from and date_to
or
:prices.date_to between date_from and date_to
or (:prices.date_from < date_from and :prices.date_to > date_to)
)
and (ROWID <> :prices.ROWID or :prices.ROWID is null);

if ln$count_exists > 0 then
   message('Overlooping is existed');
edn if;

end;

بتاريخ:

it is working

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

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

اعتقد ان الكود صحيح لكن المشكله الان


ان الفورمز لايمكن عمل


run


ابدا


ولا يظهر خطا


وحاولت حلول كثيره لم تفلح


الصور من هنا





وايضا





الموضوع






في انتظار الرد ... وشكرا

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

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

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

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

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

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

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.