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

عمل LOOP بشرط جملة SELECT

Featured Replies

بتاريخ:

السلام عليكم

كانت محتاج مساعده فى  عمل LOOP

عندي جملة INSERT و ال INSERT  ده بياخذ قيمة من جدول تاني وبينقص عاوز اول ماتوصل صفر جملة LOOP  تقف

image.png.1488034f521f0c55a9a11454261ae3a2.png

 


SET SERVEROUTPUT ON
DECLARE
    X NUMBER:=(select AUT5 from aut where AUT1 = 653); 
   BEGIN 
  WHILE (X >0)
  LOOP
    insert --- جملة 
  
  end loop ;
  end
  -- ازاي اعرف جملة select  المفروض هتجيب رقم لو الرقم اكبر من الصفر يعيد جملة insert
  -- اول مايكون صفر ال loop  توقف 

 

بتاريخ:

EXIT WHEN

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

للاسف مشتغلش

Error report -
ORA-06550: line 4, column 11:
PLS-00405: subquery not allowed in this context
ORA-06550: line 4, column 3:
PL/SQL: Statement ignored
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
 

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

انا الغلط عندي مش عارف احط جملة select  ازاي

يعني لما اعمل من غير select  بتشتتغل

انا عاوز اقول AUT5  اكبر من الصفر نفذ عدد من الجملة منها insert و update  بتغير قيمة AUT5  ولما AUT5  توصل ل صفر اقفل loop

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

image.png.f0b08ba195d89f36827cfdac2fbd4c37.png

بتاريخ:

 select AUT5  into x

from aut where AUT1 = 653

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

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

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

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

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

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.