February 25, 2005 at 3:41 pm
For some reason, neither myself nor my coworkers have been able to find an easy spreadsheet for the ASCII characters past 127 on SQL Server. Here is a simple script if you can you it.
DECLARE @Counter char(3),
@SQL varchar(150)
CREATE TABLE #ASCII_Table( [Char] varchar(1), [Dec] varchar(45))
SELECT @Counter = '128'
WHILE @Counter <= '255'
BEGIN
SELECT @sql = 'INSERT INTO #ASCII_Table( [Char], [Dec]) ' +
'SELECT CHAR(' + @Counter + '), ' + CHAR(39) + @Counter + CHAR(39)
-- PRINT @sql
EXEC( @sql)
SELECT @Counter = @Counter + 1
END
SELECT * FROM #ASCII_Table
DROP TABLE #ASCII_Table
I wasn't born stupid - I had to study.
February 25, 2005 at 5:17 pm
Not sure if this is "easy" or not but..
February 28, 2005 at 5:46 am
That was my point for posting this. Look at CHAR(180) in this chart and then try selecting it from your query analyzer. I bet you see a different result....
I wasn't born stupid - I had to study.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply