Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Miki
Starting Member
5 Posts |
Posted - 2010-05-20 : 14:02:15
|
//Below is mod 10 chekc digit algorithem//For this example, we will use a LoanID value containing the data 1234567890. Starting from the left side of the LoanID, the first step of the calculation would be to add together every other digit. Add the first, third, fifth, seventh, and ninth digits. 1 + 3 +5 +7 + 9 = 25 The next step is to multiply the result of adding the values from step 1 by the number 3: 25 x 3 =75 Then add together the remaining digits not added in step one, as a separate number. Add the second, fourth, sixth, eighth, and tenth digits of the LoanID: 2 + 4 +6 +8 + 0 = 20 Next, add the results of steps 2 and 3: 75 +20 = 95 Find the number which, when added to the result from step 4, will generate a number that is evenly divisible by 10, rounding up: 95 +n = 100 n=5 The number 5 is the mod10 check digit for this arrangement of loan ID digits. Note that the check digit will always be a single¬digit number. Thanks |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2010-05-21 : 04:20:08
|
And would you like to pay us your paycheck in return? Or accept your student degree?C'mon....at least show us you've tried to start/complete the task yourself! |
|
|
|
|
|
|
|