I don't know which will be faster nor which you prefer to read nor am I sure which is correct (I don't subtract my result from 10 like Lynn did... I do it like they do for Luhn Mod 10 Check Sums for Credit Cards).
The other thing to remember is that if you use such a thing on credit cards, the right-most digit will always be treated as a "1" multiplier and then you work to the left in 1-2 order...
DECLARE @TestData VARCHAR(12),
@ControlString CHAR(36)
SELECT @TestData = '03EA12J78',
@ControlString = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
SELECT SUM(((N+1)%2+1)*(CHARINDEX(SUBSTRING(@TestData, N, 1),@ControlString)-1))%10
FROM dbo.Tally
WHERE N <= LEN(@TestData)
--Jeff Moden
Change is inevitable... Change for the better is not.