Re: [sqlite] Problem with WHEN expressions inside CASE statement in SELECT statement

2006-06-30 Thread drh
Kurt Welgehausen <[EMAIL PROTECTED]> wrote: > Robert Duff <[EMAIL PROTECTED]> wrote: > > > I had a problem with inserting bad unicode characters into my database. > > ... > > Returned by "SELECT locationsFK,variable,logindex, CASE units WHEN units > > ISNULL THEN '#!#!#!#!#!#!#!#!#!#!' WHEN

Re: [sqlite] sqlite3_column_text question

2006-06-30 Thread Alexei Alexandrov
Perhaps because it is returning UTF8 and that needs to be unsigned, not signed? Hmm, why sqlite3_bind_text takes const char * then? -- Alexei Alexandrov

Re: [sqlite] [solved] Problem with WHEN expressions inside CASE statement in SELECT statement

2006-06-30 Thread Robert Duff
Kurt Welgehausen wrote: Robert Duff <[EMAIL PROTECTED]> wrote: I had a problem with inserting bad unicode characters into my database. ... Returned by "SELECT locationsFK,variable,logindex, CASE units WHEN units ISNULL THEN '#!#!#!#!#!#!#!#!#!#!' WHEN units = '??F' THEN

Re: [sqlite] Problem with WHEN expressions inside CASE statement in SELECT statement

2006-06-30 Thread Kurt Welgehausen
Robert Duff <[EMAIL PROTECTED]> wrote: > I had a problem with inserting bad unicode characters into my database. > ... > Returned by "SELECT locationsFK,variable,logindex, CASE units WHEN units > ISNULL THEN '#!#!#!#!#!#!#!#!#!#!' WHEN units = '??F' THEN > '' WHEN units !=

Re: [sqlite] sqlite3_column_text question

2006-06-30 Thread Will Leshner
On 6/30/06, Alexei Alexandrov <[EMAIL PROTECTED]> wrote: Why does it return *unsigned* char *? Just const char * would seem more natural Perhaps because it is returning UTF8 and that needs to be unsigned, not signed?

[sqlite] Problem with WHEN expressions inside CASE statement in SELECT statement

2006-06-30 Thread Robert Duff
I had a problem with inserting bad unicode characters into my database. In the proccess of running an upgrade, I thought I would filter units like '??F' into '°F'. I believe I have the right logic, but the WHEN expressions of my CASE statement never seem to fire, only the ELSE expression.

Re: [sqlite] database corruption

2006-06-30 Thread Jay Sprenkle
On 6/29/06, Jens Miltner <[EMAIL PROTECTED]> wrote: Hi everybody, We have encountered two corrupted databases so far at customers and we have no idea how they could become corrupted (we haven't had any corruption in house so far). Check your hardware too. A lot of cheap commodity hardware is

[sqlite] sqlite3_column_text question

2006-06-30 Thread Alexei Alexandrov
Why does it return *unsigned* char *? Just const char * would seem more natural - now I need to cast it on Windows. Also from the docs it's not clear who owns the memory returned. I assume that SQLite owns it until sqlite3_step is called. -- Alexei Alexandrov

Re: [sqlite] update or insert.

2006-06-30 Thread Jens Miltner
Am 27.06.2006 um 22:15 schrieb [EMAIL PROTECTED]: My brain does not seem to be able to function properly today. I can think of many ways to do what I want to do but none of them I like. I will describe the problem in the most symplistic form. I have two tables. The first table, has a row

Re: [sqlite] use of index in ORDER BY clause

2006-06-30 Thread Jens Miltner
Am 29.06.2006 um 17:17 schrieb Dennis Cote: Jens Miltner wrote: Is there any way to improve the ORDER BY performance for joined queries? From your answer that the intermediate results are sorted, I take it no index won't ever be used when using ORDER BY with a join query? Is there

Re: [sqlite] database corruption

2006-06-30 Thread Jens Miltner
Am 30.06.2006 um 00:01 schrieb [EMAIL PROTECTED]: I have never yet found anything useful by analyzing a corrupt database file. Generally, the only way to fix this kind of problem is come up with a reproducible test case. Unfortunately, that may prove difficult, if not impossible :( Anyway,

[sqlite] Virtual Table: Interface concerns

2006-06-30 Thread Ralf Junker
Hello, I have a few remarks concerning the Virtual Table interface as it is currently defined in CVS. I am very enthusiastic about the Virtual Table concept but can see a few limitations. Time permitting, I kindly ask the core developers to give a short feedback that they have taken notice of