2> -- Create temporary table for numbers:
3> Create Table #ASCIIVals (ASCIIValue SmallInt)
4> GO-- Insert numbers 0 - 127 into table:
1> Insert Into #ASCIIVals (ASCIIValue) Select 0
2> Insert Into #ASCIIVals (ASCIIValue) Select 1
3> Insert Into #ASCIIVals (ASCIIValue) Select 2
4> Insert Into #ASCIIVals (ASCIIValue) Select 3
5> Insert Into #ASCIIVals (ASCIIValue) Select 4
6> Insert Into #ASCIIVals (ASCIIValue) Select 123
7> Insert Into #ASCIIVals (ASCIIValue) Select 124
8> Insert Into #ASCIIVals (ASCIIValue) Select 125
9> Insert Into #ASCIIVals (ASCIIValue) Select 126
10> Insert Into #ASCIIVals (ASCIIValue) Select 127
11> GO-- Return all integer values and corresponding ASCII characters:
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
(1 rows affected)
1> SELECT ASCIIValue, CHAR(ASCIIValue) As Character FROM #ASCIIVals
2>
3> drop table #ASCIIVals;
4> GO
ASCIIValue Character
---------- ---------
0
1 ?
2 ?
3 ?
4 ?
123 {
124 |
125 }
126 ~
127 ?
(10 rows affected)
|