I would like to know if it is possible to control the phone number in SQL before inserting it to the destination DB?Sorry for asking question again.Hi,JThanks,Any suggestion will be highly appreciated.The data for phone number that I am migrating doesn't have country code. I want to determine first if the number has country code in it, if it doesn't then I will add the country code on the number before INSERTING it to the destination database.I have a model in Django:
class BasePerson(TimeStampedModel):
phone_number = PhoneNumberField(max_length=50, verbose_name=_(u'phone number'), blank=True)
I don't have any code for you, if that is what you are soliciting. I did find a couple of informative web sites which help explain how international phone numbers are formatted. These are known as E.164 numbers.
Note that the above mainly talk about how a number is formatted, not on how to validate that it is an actual phone number. You must trust the end user. Which is another can of worms. Case in point -- Yesterday I got 6 automated phone calls from the local cable company to verify some installation. The problem is, I am not installing anything. The person either gave them a bad number or mistyped it into a web page or the customer service rep mistyped it.
We all have skeletons in our closet.
Mine are so old, they have osteoporosis.
Maranatha! <><
John McKown
John McKown