UK Telephone Numbers Generator

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

UK Telephone Numbers Generator

Postby CraigOttley » Tue Jan 18, 2011 2:55 pm

Hi! I was asked to generate some telephone numbers. Some of the numbers got picked and were dialled successfully!! So after doing some research I came across Ofcom's site which listed numbers which will never be used....

http://stakeholders.ofcom.org.uk/telecoms/numbering/guidance-tele-no/numbers-for-drama

I've now put these into a Custom Generator so i'll never have the same problem again :o

HTH

Code: Select all
<generators>
   <generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Phone Number" description="020 7946 0000, 01632 960999..." category="Telephone Numbers">
      <property name="Expression">((0113|0114|0115|0116|0117|0118|0121|0131|0141|0151|0161)(4960\\d{3})|02079460\\d{3}|02890180\\d{3}|02920180\\d{3}|01632960\\d{3}|01914980\\d{3})</property>
      <matches field=".*Phone.*" score="100" minlen="11"/>
      <matches field=".*Tel.*" score="99" minlen="11"/>
      <type type="string"/>
   </generator>
   <generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Mobile" description="07700 900 000, 07700 900 999..." category="Telephone Numbers">
      <property name="Expression">07700900\\d{3}</property>
      <matches field=".*Mobile.*" score="99" minlen="11"/>
      <type type="string"/>
   </generator>
   <generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Freephone" description="08081 570 000, 08081 570 999..." category="Telephone Numbers">
      <property name="Expression">08081570\\d{3}</property>
      <matches field=".*Free.*" score="70" minlen="11"/>
      <matches field=".*Work.*" score="70" minlen="11"/>
      <type type="string"/>
   </generator>
   <generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="Premium Rate Services" description="0909 8790 000, 0909 87990 999..." category="Telephone Numbers">
      <property name="Expression">09098790\\d{3}</property>
      <matches field=".*Work.*" score="50" minlen="11"/>
      <type type="string"/>
   </generator>
   <generator type="RedGate.SQLDataGenerator.ExpressionGenerators.RegexpGenerator" name="UK Wide" description="03069 990 000, 03069 990 999..." category="Telephone Numbers">
      <property name="Expression">03069990\\d{3}</property>
      <type type="string"/>
   </generator>
</generators>
CraigOttley
 
Posts: 13
Joined: Thu Jul 15, 2010 11:50 am
Location: Newport Pagnell

Postby chriskelly » Wed Jan 19, 2011 3:03 pm

Thank you for your post and your information. Looks useful.
chriskelly
 
Posts: 330
Joined: Mon Apr 19, 2010 1:44 pm
Location: Cambridge, UK


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests