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

بتاريخ:

بسم الله الرحمن الرحيم

 

اخواني الاعزاء

انا كنت عامل متغير عادي لكنه كان يحفظ قيمه واحده فقط

 

الان حولت على الكورسر  والفيتش لكن المشكله مازالت قائمة

 

انا كاتب الكود التالي

 

Declare 
xx number;
Cursor C1 is
select comp_no from comp_super
where
comp_super.super_no =  :text_item68;

Begin
Open C1;

Loop 
Fetch C1 into xx;
Exit when C1%notfound;
End loop;

for i in (select all items_no from items
where items.status=0 and items.comp_no in (xx) )
loop
next_record;

:tot_sem_do.item_no :=i.items_no;

end loop;

Close C1;

End;

الذي على  اساس انه بيحفظ اكثر من قيمه مرجعه للمتغير xx

ولكن عند عمل اللوب يبدو انه يحفظ القيمه الاولى وعندما يعمل لوب مره اخرى يحذف القيمه الاولى ويحفظ القيمه الجديده وهكذا

حتى في الاخير يحفظ قيمه واحده فقط هي اخر قيمه وجدها

 

كيف احفظ اكثر من قيمه في المتغير xx

وشكرا

 

بتاريخ:

لعلك تستخدم ARRAY 

 

انظر هذا المصدر

https://stackoverflow.com/questions/35884817/fetch-a-cursor-into-array

 

دمت بخير وعافية

بتاريخ:

ادخل loop الثانية جواه loop الاولى

Declare 
xx number;
Cursor C1 is
select comp_no from comp_super
where
comp_super.super_no =  :text_item68;

Begin
Open C1;

Loop 
Fetch C1 into xx;
Exit when C1%notfound;


for i in (select all items_no from items
where items.status=0 and items.comp_no in (xx) )
loop
next_record;

:tot_sem_do.item_no :=i.items_no;

end loop;

End loop;

Close C1;

End;

تم تعديل بواسطة mohamed.ramadan

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

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

 

وجزاك الله خير اخي محمد رمضان وجاري التجربه

 

وشكرا

بتاريخ:

لعل هذا يفيدك بخصوص الCollections عموما 

https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#LNPLS005

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

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

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

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

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

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.