SQL Server Performance

convert alpha to numeric equivilent

Discussion in 'ALL SQL SERVER QUESTIONS' started by MichaelB, Jul 25, 2012.

  1. MichaelB Member

    I can do the following:

    select char(64 + 2) = B
    select char(64 + 3) = C

    the result is B. I can put in a number and get the letter in that position in aphabet.
    How do I do the opposite. I need to pass a B and get 2 or c and get 3 and so on...
  2. MichaelB Member

    duhh forget it.. I got it.

Share This Page