الانتقال إلى المحتوى

اين الحطأ


leader_a2000

Recommended Posts

اخوانبي الاعزاء اين الخطأ لو تكرمتم

declare
x1 date;
x2 date;
cursor c1 is select to_char(sysdate,x2,' day') from dual where to_char(sysdate,x2) between '1-jan-2010' and '31-dec-2010';
begin
--	open c1;
--	fetch c1 into x1;
for x1 in c1 loop
:BLOCK2.X1:= to_char(sysdate,' x2') ;
next_record;
end loop;
close c1;

end; 

رابط هذا التعليق
شارك

السلام عليكم
اذا لم اكن مخطىء ربما كان هذا هو القصد:

set serveroutput on
declare
     type rec is record(
    x1 date,
    x2 varchar2(30):='dd.mm.yy'
   );

       myRec  rec;
cursor c1 is select to_date(sysdate,myRec.x2) from dual 
where to_date(sysdate,myRec.x2) between to_date('01.01-10',myRec.x2) 
and to_date('01-12-2010',myRec.x2);
begin
  open c1;
   fetch c1 into myRec.x1;
   dbms_output.put_line(to_date(myRec.x1,myRec.x2));  
   close c1;
end;


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

رابط هذا التعليق
شارك

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

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

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

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

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