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

بتاريخ:

الأخوة الاعزاء ....

سوف نتعلم كيف نصنع دالة تغيير شكل تنسق رقم المحمول - حيث يتم ذكر رقم شركة المحمول بجوار رقم المحمول
Example

01022222222 Convert ---------> into Vodafone (010)- 22222222



Create Or Replace Function Format_Mobile(Mobile in  number) return Varchar2
is

v1 varchar2(20):=  0 || to_char(Mobile);
c_company varchar2 (30);
FMT VARCHAR2(30);
begin

V1 := substr(V1,1,3);
--------Select Comapny by Code ------------------------------------
c_company := case V1
WHEN '010' then 'Vodafone'
WHEN '016' then 'Vodafone'
WHEN '012' then 'Mobinil'
WHEN '018' then 'Mobinil'
WHEN '011' then 'Etsalat'
end;

-------Format Mobile----------------------------------------------
FMT := c_company || ' (' ||	 V1		  ||   ')- ' ||	   SUBSTR(Mobile,3);
RETURN FMT;

end Format_Mobile;



الان سوف نقوم بمناداة الدالة

Select format_Mobile(010222222) from Dual



تكون النتيجة

Vodafone (010)-2222222

يمكن استخدام الدالة الجديدة مع جدول

select format_mobil(Mobile)  from Employees


تكون النتيجة

----------------------------------------------------------------------
Vodafone (010) -255554554
----------------------------------------------------------------------
Vodafone (016) -245154544
----------------------------------------------------------------------
Vodafone (010) -681145562
----------------------------------------------------------------------
Mobinil  (012) -612224411
----------------------------------------------------------------------
Mobinil  (012) -889222425
----------------------------------------------------------------------
Vodafone (010) -115221136
----------------------------------------------------------------------
Mobinil  (018) -255680202
----------------------------------------------------------------------
Etsalat  (011) -833155500
----------------------------------------------------------------------

بتاريخ:

لك جزيل الشكر والعرفان يا أخي

بتاريخ:

جزاك الله خيرا


وننتظر منك دائما المزيد

  • بعد 2 أسابيع...
بتاريخ:

جزاك الله كل خير اعطاك الله من علمه


ولكن انا عاو اعمل دالة تعمل لى ارقام واحرف تتكون من 12 رقم او اكثر
علما بان الرقم لم تتكرر
وشكرا

بتاريخ:

جزاك الله كل خير
كيف تعمل هذه الدالة اللى ذكرة الاخ salah_sql
وشكرا

بتاريخ:

جزاك الله كل خير اخي

لا تحرمنا من ابداعاتك

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

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

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

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

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

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.