Validating sin numbers

Here's how the algorithm works for verifying credit cards; the math is quite simple: 1) Starting with the second to last digit and moving left, double the value of all the alternating digits.

2) Starting from the left, take all the unaffected digits and add them to the results of all the individual digits from step 1.

To generate the check digit, the LUHN formula is applied to the number.

Based on ANSI X4.13, the LUHN formula (also known as the modulus 10, or mod 10, algorithm) is used to generate and/or validate and verify the accuracy of credit-card numbers.

And if you're storing more than numeric data (e.g.

the delimiters), then wouldn't you need more than 15 characters to store a formatted 15-digit number?

As of now, we are expecting phone numbers to come in a number of formats (from an XML file). If 2 or 3 are yes, I think I'd do two fields and some kind of crazy parser to determine what is extension or other data and deal with it appropriately.

This field needs to be indexed heavily as Sales Reps can use this field for searching (including wild character search). If the first is a yes and the other two are no, I'd use two varchar(50) fields, one for the original input and one with all non-numeric data striped and used for indexing.

Search for validating sin numbers:

validating sin numbers-74validating sin numbers-12validating sin numbers-3

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating sin numbers”

  1. Überlegen Sie sich genau, wem Sie Ihre Telefonnummer, private E-Mail-Adresse oder Skype-Namen geben. DE ist Ihre Privatsphäre geschützt und Sie bestimmen, wann was passiert.2.

  2. 2 on the American Human Development Index, a scale that measures information on women's educational attainment, life expectancy, and median earnings (meaning female inhabitants are well educated, live long, and make money).