Sorry again. The problem is solved. I had to read FM :) and use sqlite3_open16 instead of sqlite3_open.
-----Original Message----- From: Maxim V. Shiyanovsky [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 11, 2007 2:34 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] how to cast utf16 text to int? Sorry, I forgot initial problem. As I wrote in the first letter I need cast from utf-16 text to int. In other words I need select like this: Select * from t, d where cast(t.value as int) = d.id Assuming t.value is utf-16 presentation of numeric. This select works fine for one-digit value. It would be more correct to say that cast use first utf-16 symbol only. One more time: sqlite> create table t (value text, field_type int); sqlite> create table d (id int, data int); sqlite> insert into t values (X'31003700', 1); sqlite> insert into d values (1, 1); sqlite> insert into d values (17, 2); sqlite> Select * from t, d where cast(t.value as int) = d.id; 1|1|1|1 sqlite> So should I use other cast? Is this possible at all? ------------------------------------------------------------------------ ----- To unsubscribe, send email to [EMAIL PROTECTED] ------------------------------------------------------------------------ ----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------