Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kkumar
Starting Member
2 Posts |
Posted - 2008-07-07 : 02:06:36
|
| Hi,I am trying to set the value of some attribute in a table, but it is storing the ascii value, not the character itself.e.g.select ascii(flag) from mytable;ASCII(flag)_______________1update mytable set flag='0';it showsselect ascii(flag) from mytable;ASCII(flag)_______________48Note:flag is of type CHAR(1)Kindly suggest how can I store the actual character in the attribute rather than its ascii value.Regards,Kuldeep |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-07-07 : 02:13:07
|
| select flag from mytable instead of select ascii(flag) from mytable will bring '0' instead of 48.GreetingsWebfredThere are 10 types of people in the world: Those who understand binary, and those who don't... |
 |
|
|
kkumar
Starting Member
2 Posts |
Posted - 2008-07-07 : 02:31:26
|
Thanks webfred!!But why it store the ascii value when i do instead of charcter itself :update mytable set='0';quote: Originally posted by webfred select flag from mytable instead of select ascii(flag) from mytable will bring '0' instead of 48.GreetingsWebfredThere are 10 types of people in the world: Those who understand binary, and those who don't...
Regards,Kuldeep |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-07-07 : 02:41:34
|
| I'm sorry, but i cannot understand the problem.Maybe someone else in this forum can help?GreetingsWebfredThere are 10 types of people in the world: Those who understand binary, and those who don't... |
 |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2008-07-07 : 03:13:24
|
| it's not storing the ascii value. You are selecting the ascii value when you use the ascii() funtion. |
 |
|
|
|
|
|