DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Database Design (http://www.daniweb.com/forums/forum142.html)
-   -   Regarding ASCII data type (http://www.daniweb.com/forums/thread146464.html)

srs_grp Sep 18th, 2008 6:40 am
Regarding ASCII data type
 
Does SQL support ASCII data type?Or we need to do some type casting for it.?

dickersonka Sep 18th, 2008 10:52 am
Re: Regarding ASCII data type
 
not really sure what you are meaning

all characters will have an int value, and you can translate the int value back to a char

you can use ascii(char)
or
char(ascii)

select ascii('q')
-- returns 113

select char(113)
-- returns 'q'

srs_grp Sep 22nd, 2008 9:37 am
Re: Regarding ASCII data type
 
Quote:

Originally Posted by dickersonka (Post 694138)
not really sure what you are meaning

all characters will have an int value, and you can translate the int value back to a char

you can use ascii(char)
or
char(ascii)

select ascii('q')
-- returns 113

select char(113)
-- returns 'q'






////////////////////////
Actually for r project, we need to store fields having data type as ASCII characters and we are not getting how to do it?

dickersonka Sep 22nd, 2008 9:49 am
Re: Regarding ASCII data type
 
Having data type as what?

What are you not understanding?


All times are GMT -4. The time now is 11:36 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC