Monday, March 19, 2012

ascii values

hi guys,

i want to know hoe to get ascii values in a astored procedure.

the senario is i am reading a character and checking whether it is a special character or not.

if it is a special character the database does the further operations.

i have written the program in C#, but not able to use it in stored procedure

i do not know how to read the "ascii value" in Transact sql.

coding is all what i do, coding is all what i want to do.

Use the ascii function:

declare @.char char(1)

set @.char = 'A'

select ascii(@.char)

set @.char = ''

select ascii(@.char)

Returns:


--
65

--
233

No comments:

Post a Comment