Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Select mobile from emp table number is Saudi line, number is STC company line, number contains number 1 twice, number does not contain number 9.

Saudi line start with6.

STC line start with,,.

example:

note: you can use regular expressions 

 

user-image
Question added by Abdulhameed Al-Hababi , IT manager , مصنع الحفظي للمشغولا المعدنية Alhefzi Factroy
Date Posted: 2016/12/22
issa abed rabbo
by issa abed rabbo , Senior Business Consultant / System Analyst , Pioneers Technology (Pio-Tech)

SELECT mobile

    FROM emp

   WHERE     mobile LIKE '00966%'

         AND SUBSTR (mobile, 6, 2) IN (50, 55, 53)

         AND mobile NOT LIKE '%9%'

  HAVING REGEXP_COUNT (mobile,

                       '1',

                       1,

                       'i') = 2

GROUP BY mobile

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.