﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Jon McGhee  / convert string to ascii values / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 01:31:28 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>[quote][b]LondonNick (4/30/2010)[/b][hr]A very similar script is in BOL if you look up CHAR.[/quote]Agreed... and it shouldn't be used either. ;-)For those that haven't seen it, please see the following for how a "Numbers" or "Tally" can be used as a very high performance replacement for certain types of While Loops...[url]http://www.sqlservercentral.com/articles/T-SQL/62867/[/url]There are dozens of uses for such a table.I also agree with Jon... if you find something that may be useful, it's impossible to know if it posted somewhere else or even in BOL.  Nothing wrong with posting something you may think is useful even if it's documented in BOL.  After all, there are still a lot of folks that don't even know what BOL is never mind having actually read it from top to bottom.</description><pubDate>Sat, 01 May 2010 17:07:40 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>[quote][b]Jon McGhee (4/30/2010)[/b][hr]Cool.  I did not know that, but I see it now.  Usually when I look for code examples I don't search BOL, I search this site.  If I don't find what I need, it's time to contribute code.  Thanks.[/quote]I have to ask then... do you know what a Tally table is and how it works to replace While Loops?  And, no, I'm not trying to be a smart guy here.</description><pubDate>Sat, 01 May 2010 17:03:13 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>Cool.  I did not know that, but I see it now.  Usually when I look for code examples I don't search BOL, I search this site.  If I don't find what I need, it's time to contribute code.  Thanks.</description><pubDate>Fri, 30 Apr 2010 07:49:36 GMT</pubDate><dc:creator>Jon McGhee</dc:creator></item><item><title>RE: convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>A very similar script is in BOL if you look up CHAR.</description><pubDate>Fri, 30 Apr 2010 04:15:42 GMT</pubDate><dc:creator>LondonNick</dc:creator></item><item><title>RE: convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>Alternatively, using a Tally table (see link in my sig) to avoid the loop:[code="sql"]declare @x nvarchar(100)set @x = 'AZ az' + char(160) + '01' -- note: 160 is an html non breaking space SELECT         SUBSTRING(@x,N,1), ASCII(SUBSTRING(@x,N,1))   FROM         Tally  WHERE         N &amp;lt;= LEN(@x)[/code]</description><pubDate>Fri, 30 Apr 2010 03:20:59 GMT</pubDate><dc:creator>nigel.</dc:creator></item><item><title>convert string to ascii values</title><link>http://www.sqlservercentral.com/Forums/Topic910830-2626-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/ASCII/70111/"&gt;convert string to ascii values&lt;/A&gt;[/B]</description><pubDate>Mon, 26 Apr 2010 23:30:06 GMT</pubDate><dc:creator>Jon McGhee</dc:creator></item></channel></rss>