Re: [sqlite] incorrect where clause does not throw error

2009-05-09 Thread John Machin
On 10/05/2009 6:53 AM, Stefan Finzel wrote: > Porting an application to sqlite3.6.13 on Linux i made a mistake > creating a illegal query on a character field: > > select * from Test where Remark = NULL > > select * from Test where Remark <> NULL > > I was confused as there were neither data

[sqlite] incorrect where clause does not throw error

2009-05-09 Thread Stefan Finzel
Porting an application to sqlite3.6.13 on Linux i made a mistake creating a illegal query on a character field: select * from Test where Remark = NULL select * from Test where Remark <> NULL I was confused as there were neither data nor an error. Shouldn't this cause at least an error

Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Igor Tandetnik
"Sam Carleton" wrote in message news:8d38ca0a0905090811g7415ebereb4eb241a44e4...@mail.gmail.com > This is my first BEFORE INSERT trigger in SQLite and I am getting an > error: > > SQL error: near "new": syntax error > > My goal is that on an insert only the insertedby

Re: [sqlite] estonian collation

2009-05-09 Thread Igor Tandetnik
"Allar Ounapuu" wrote in message news:678377.45281...@web50107.mail.re2.yahoo.com > I'ld like to sort fields in estonian way (alphabet is > abcdefghijklmnoprsszztuvwoauxy). I'ld like to add my own collation > rule, but have no idea about it.

[sqlite] estonian collation

2009-05-09 Thread Allar Õunapuu
Hello I'ld like to sort fields in estonian way (alphabet is abcdefghijklmnoprsšzžtuvwõäüxy). I'ld like to add my own collation rule, but have no idea about it. Allar Õunapuu allarpuu.active.ee ___ sqlite-users mailing list

Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Sam Carleton
Actually that will not work the long term. I am going to have a update trigger to do the same basic thing and default values will not work there;) I would also really like to enforce on insert that both inserter and updater be the same. Sam On 5/9/09, Swithun Crowe

Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Simon Davies
2009/5/9 Sam Carleton : > This is my first BEFORE INSERT trigger in SQLite and I am getting an error: > > SQL error: near "new": syntax error > > My goal is that on an insert only the insertedby value is provide. > The trigger will set that to the updatedby, insertedon

Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Pavel Ivanov
According to the syntax of CREATE TRIGGER statement you can use in the trigger body only insert/update/delete/select statements. There's no support of simple assignments or any other programming language extensions. Pavel On Sat, May 9, 2009 at 11:11 AM, Sam Carleton

Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Swithun Crowe
Hello SC My goal is that on an insert only the insertedby value is provide. The SC trigger will set that to the updatedby, insertedon and updatedon SC fields. I searched the web and the only examples I could find was of SC an AFTER INSERT, am I better off with that approach? I would think

Re: [sqlite] sqlite3_create_collation_v2 and SQLITE_UTF16_ALIGNED

2009-05-09 Thread Florian Weimer
* D. Richard Hipp: > On May 3, 2009, at 11:15 AM, Florian Weimer wrote: > >> The documentation suggests that I can pass SQLITE_UTF16_ALIGNED. >> However, the logic in main.c:createCollation() assumes that >> SQLITE_UTF16_ALIGNED is ORed with another encoding flag value >> (presumably

[sqlite] setting a date in a BEFORE INSERT trigger

2009-05-09 Thread Sam Carleton
This is my first BEFORE INSERT trigger in SQLite and I am getting an error: SQL error: near "new": syntax error My goal is that on an insert only the insertedby value is provide. The trigger will set that to the updatedby, insertedon and updatedon fields. I searched the web and the only

Re: [sqlite] select performance with join

2009-05-09 Thread Jim Wilcoxson
Thanks for the explanation. I recall seeing posts suggesting the use of union instead of or, and thought "if it's that easy, why doesn't SQLite do it?" The optimizer documentation says: --- Suppose the OR clause consists of multiple subterms as follows: expr1 OR expr2 OR expr3 If every

Re: [sqlite] Database creation and inserts speedup

2009-05-09 Thread Radu Lodina
Hi, General consideration: A. Run insert in "bulk fashion": BEGIN INSERT INTO /* ~1 - 2000 (or more) inserts line*/ COMMIT B. If index have complex clause please don't create index until you finish data upload in tables. Good look - Original Message - From: "J. R.

Re: [sqlite] make test: Tests fail on Linux running on MIPS (Big endian)

2009-05-09 Thread mwnn
When i run the SQL queries from the failed test cases on an sqlite shell, all of them seem to have the right opcodes. For Example, SQL queries that are supposed to have OPENEPHEMERAL opcodes when executed on a shell lists the OPENEPHEMERAL opcode. But when a "puts " printed from within the test