Archive › March, 2013

SQLServer – T-SQL: Converting any string to its equivalent ASCII numeric value

Sometimes you need to convert an string to an unique number identifier, for instance converting an existing string PK to a numeric PK. Here we provide a sample function which converts any string value to an unique numeric value by converting each character to its ASCII value: Function ascii_value:

For instance, if you execute: […]

Comments ( 0 )