Re: [sqlite] char,ascii function in sqlite

2009-12-07 Thread Jean-Christophe Deschamps
>hi , im using sqlite3 in debain > >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. No such function is part of the SQLite core. But I wrote an extension offering

Re: [sqlite] char,ascii function in sqlite

2009-12-07 Thread Pavel Ivanov
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

Re: [sqlite] char,ascii function in sqlite

2009-12-07 Thread Simon Slavin
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

[sqlite] char,ascii function in sqlite

2009-12-06 Thread greensparker
hi , im using sqlite3 in debain 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. Greensparker -- View this message in context: