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

كود فى الbutton وليس له حل

Featured Replies

بتاريخ:

 

هذا الكود حاولت فيه مرارا وتكرارا للوصول لنتيجة ولم احصل عليها

 

ارجو الرد وهذا هو الايميل بتاعى               [email protected]

 


declare
  v_total number; mos_main number; count_dy number;   --x number;y varchar2(50);z varchar2(50);
  total_perc number(30,5); mos_perc number(30,5); mos_per_day number(30,5);
  mos_dy number; total_mos_profit number(30,5);  
  v_all_per number(30,5) ; v_after_dis number(30,5);


cursor c_mosahem is select MOSAHEM_ID,MOSAHEM_name,main_percent from MOSAHEM ;
v_mosahem c_mosahem%rowtype;

begin


open c_mosahem;
loop
fetch c_mosahem into v_mosahem ;
exit when c_mosahem%notfound;


select sum(main_percent)
 into v_total 
 from mosahem ;
message('v_total='||v_total); 
message('v_total='||v_total);


v_all_per:=(v_total *:control.PROFIT_PERCENT)/100 ;


message('v_all_per= '||v_all_per);
message('v_all_per= '||v_all_per);

select main_percent
    into mos_main 
    from mosahem
     where mosahem_id=v_mosahem.mosahem_id;
     message('mos_main='||mos_main);message('mos_main='||mos_main);


   mos_perc:=(mos_main/v_total)*100;
   mos_per_day:=mos_perc/30;
   
   message('mos_perc='||mos_perc);message('mos_perc='||mos_perc);
   message('mos_per_day='||mos_per_day);message('mos_per_day='||mos_per_day);
   
   select to_char(reg_date,'dd')
   into count_dy
    from mosahem 
   where mosahem_id=v_mosahem.mosahem_id;
   message('count_dy='||count_dy);
   message('count_dy='||count_dy);
    select 30- count_dy
    into mos_dy
    from mosahem
    where mosahem_id=v_mosahem.mosahem_id;
   message('mos_dy='||mos_dy);message('mos_dy='||mos_dy);
    
   if mos_dy>=29 then
   
   total_mos_profit:=(to_char(sysdate,'dd')-to_number(count_dy)) * round(mos_per_day,3) ;
   total_mos_profit:=(v_all_per *mos_perc)/100 ;
   message('total_mos_profit='||total_mos_profit);
   message('total_mos_profit='||total_mos_profit);
  /* if count_dy>=30 then
 -- total_mos_profit:=(30-to_number(count_dy)) * round(mos_per_day,3) ; 
  total_mos_profit:=(v_all_per *mos_perc)/100 ;
  
    message('total_mos_profit' || total_mos_profit);
    message('total_mos_profit' || total_mos_profit);
else
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;
    
       update mosahem 
       set main_percent=mos_main+total_mos_profit 
       where mosahem_id=v_mosahem.mosahem_id ;
   elsif count_dy<30 then
    update mosahem 
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;*/
   else
    update mosahem
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;
    end loop;
close c_mosahem;
end;
commit;

 

تم تعديل بواسطة Ahmad.Hasan

بتاريخ:

 

هذا الكود حاولت فيه مرارا وتكرارا للوصول لنتيجة ولم احصل عليها
 
ارجو الرد وهذا هو الايميل بتاعى               [email protected]
 
declare
  v_total number; mos_main number; count_dy number;   --x number;y varchar2(50);z varchar2(50);
  total_perc number(30,5); mos_perc number(30,5); mos_per_day number(30,5);
  mos_dy number; total_mos_profit number(30,5);  
  v_all_per number(30,5) ; v_after_dis number(30,5);
 
cursor c_mosahem is select MOSAHEM_ID,MOSAHEM_name,main_percent from MOSAHEM ;
v_mosahem c_mosahem%rowtype;

 

 

begin
 
open c_mosahem;
loop
fetch c_mosahem into v_mosahem ;
exit when c_mosahem%notfound;
 
select sum(main_percent)
 into v_total 
 from mosahem ;
message('v_total='||v_total); 
message('v_total='||v_total);
 
v_all_per:=(v_total *:control.PROFIT_PERCENT)/100 ;
 
message('v_all_per= '||v_all_per);
message('v_all_per= '||v_all_per);

 

 

select main_percent
    into mos_main 
    from mosahem
     where mosahem_id=v_mosahem.mosahem_id;
     message('mos_main='||mos_main);message('mos_main='||mos_main);
 
   mos_perc:=(mos_main/v_total)*100;
   mos_per_day:=mos_perc/30;
   
   message('mos_perc='||mos_perc);message('mos_perc='||mos_perc);
   message('mos_per_day='||mos_per_day);message('mos_per_day='||mos_per_day);
   
   select to_char(reg_date,'dd')
   into count_dy
    from mosahem 
   where mosahem_id=v_mosahem.mosahem_id;
   message('count_dy='||count_dy);
   message('count_dy='||count_dy);
    select 30- count_dy
    into mos_dy
    from mosahem
    where mosahem_id=v_mosahem.mosahem_id;
   message('mos_dy='||mos_dy);message('mos_dy='||mos_dy);
    
   if mos_dy>=29 then
   
   total_mos_profit:=(to_char(sysdate,'dd')-to_number(count_dy)) * round(mos_per_day,3) ;
   total_mos_profit:=(v_all_per *mos_perc)/100 ;
   message('total_mos_profit='||total_mos_profit);
   message('total_mos_profit='||total_mos_profit);
  /* if count_dy>=30 then
 -- total_mos_profit:=(30-to_number(count_dy)) * round(mos_per_day,3) ; 
  total_mos_profit:=(v_all_per *mos_perc)/100 ;
  
    message('total_mos_profit' || total_mos_profit);
    message('total_mos_profit' || total_mos_profit);
else
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;
    
       update mosahem 
       set main_percent=mos_main+total_mos_profit 
       where mosahem_id=v_mosahem.mosahem_id ;
   elsif count_dy<30 then
    update mosahem 
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;*/
   else
    update mosahem
   set main_percent=(mos_per_day*mos_dy)+main_percent where mosahem_id=v_mosahem.mosahem_id ;
    end if;
    end loop;
close c_mosahem;
end;
commit;

 

محدش فاهم المشكلة فين فمحدش هيعرف يجاوبك

ايه الايرور ؟ فيه ايرور اصلا ولا فين المشكلة ؟

بتاريخ:

 use exception too many rows and no date_found to found  the problem

good luck 

بتاريخ:

السلام عليكم

 

اخي عشان نساعدك اشرح لنا المشكلة وارفق لنا الفورم

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

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

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

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

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

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.