بتاريخ: 8 مايو 201214 سنة comment_224205 السلام عليكماريد مساعدهاعمل في مشروع للمخازن و ايد ان يظهر لي في خانت ال item no بهذه الصورهIT-001IT-002........الى مالا نهايهبحيث يظهر عندي اتوماتيك بعد ما ادخل اسم ITEMوعندي سؤال اخركيف استدعي التقويم الموجود في الفورم ؟ تقديم بلاغ
بتاريخ: 8 مايو 201214 سنة comment_224207 BEGIN SELECT NVL(MAX(TO_NUMBER(SUBSTR(rec_id,-3))),0) + 1 INTO :wrk_rec.rec_id FROM wrk_rec 1 AND TO_CHAR(rec_DATE,'YYYY') = TO_CHAR(sysdate,'YYYY') ; IF LENGTH( :wrk_rec.rec_id ) <> 6 THEN :wrk_rec.rec_id := 'it-'||to_char(sysdate,'yy') ||LPAD( :wrk_rec.rec_id,3,0); END IF; END;; تقديم بلاغ
بتاريخ: 8 مايو 201214 سنة comment_224211 السلام عليكم Select 'IT-'||Lpad(Nvl(Max(Trans_No + 1), 1), 3, 0) Into :Blk_1.Trans_No From Your_Table; تقديم بلاغ
بتاريخ: 12 مايو 201214 سنة كاتب الموضوع comment_224398 صباح الخيرجربت هذا Select 'IT-'||Lpad(Nvl(Max(Trans_No + 1), 1), 3, 0) Into :Blk_1.Trans_No From Your_Table; يظهر عندي بشكل متكرر IT-001 كل الحقولليش ؟وصفة Item_no varchar2 صح؟ تقديم بلاغ
بتاريخ: 12 مايو 201214 سنة كاتب الموضوع comment_224405 when create record [color=#660066]Select[/color] [color=#008800]'IT-'[/color][color=#666600]||[/color][color=#660066]Lpad[/color][color=#666600]([/color][color=#660066]Nvl[/color][color=#666600]([/color][color=#660066]Max[/color][color=#666600]([/color][color=#660066]Trans_No[/color] [color=#666600]+[/color] [color=#006666]1[/color][color=#666600]),[/color] [color=#006666]1[/color][color=#666600]),[/color] [color=#006666]3[/color][color=#666600],[/color] [color=#006666]0[/color][color=#666600])[/color] [color=#660066]In[/color] [color=#660066]to[/color] [color=#666600]:[/color][color=#660066]Blk_1[/color][color=#666600].[/color][color=#660066]Trans_No[/color] [color=#660066]From[/color] [color=#660066]Your_Table[/color] يظهر في اول خانه IT-001بس لما انتقل الى next item يظهر نفس القيمه ليش تقديم بلاغ
بتاريخ: 13 مايو 201214 سنة comment_224463 rather than writting this code on pre-insert trigger or any other trigger , i suggest u good idea i think writte that code on when-validate-item on the text item which it holds the name , and go for propery paleete for the text item set it unupdatableby making enabled to no ..............like this after you write the name automaticaly generate the next id like yo have written in your code thank u تقديم بلاغ
بتاريخ: 13 مايو 201214 سنة comment_224465 اخي الكريم حتى نقوم بعمل هذا لابد من ان يكون نوعه نص وبالتالي لقد قمت بانشاء جدول مكون من ثلاثه حقول للتوضيح حيث الحقل الاول رقم سوف يكون رقم تسلسلي وهذا الحقل لن يظهر في التصميم والحقلين الاخرين من نوع نص الحقل رقم الكمبيوتر سوف ياخذ قيمه وهي عباره عن دمج السلسله النصيه بقيمة الرقم التسلسلي وقد قمت بارفاق الجدول مع المثال انشاء الله تستفيد منه مع جميع الاعضاء وهذا المثال اشتغل بالشكل الذي طلبته واي استفسار انا مستعد انشاء الله cocatid with string.rar تقديم بلاغ
بتاريخ: 13 مايو 201214 سنة comment_224469 السلام عليكم Select 'IT-'||Lpad(Nvl(Max(Trans_No + 1), 1), 3, 0) Into :Blk_1.Trans_No From Your_Table; هذا الكود يعمل بشكل سليم لكن تأكد من جملة الـ Where لديك. تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.