Convert Varchar to Ascii
问题 I'm trying to convert the contents of a VARCHAR field to be unique number that can be easily referenced by a 3rd party. How can I convert a varchar to the ascii string equivalent? In TSQL? The ASCII() function converts a single character but what can I do to convert an entire string? I've tried using CAST(ISNULL(ASCII(Substring(RTRIM(LTRIM(PrimaryContactRegion)),1,1)),'')AS VARCHAR(3)) + CAST(ISNULL(ASCII(Substring(RTRIM(LTRIM(PrimaryContactRegion)),2,1)),'')AS VARCHAR(3)) ....but this is