As Simon said use substr() to get first character and use cast(X'FF' as text) to convert some hexadecimal character code to symbol (in my example the code is FF = 255). But there's no way to convert character into its code, so you cannot do any arithmetics with it though you probably don't need it because comparison seems to be enough and it's perfectly good with text data type.
Pavel On Mon, Dec 7, 2009 at 5:24 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 7 Dec 2009, at 5:56am, greensparker wrote: > >> i want to check the first character should not be an special character. >> [by before insert trigger] >> how to do it? >> i thought of using ascii function but i didnt find in sqlite. > > substr(X,Y,Z) > > will get you the first character. I'm not sure what you mean by 'special', > but the core functions are here: > > http://www.sqlite.org/lang_corefunc.html > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users