Re: [sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-13 Thread Christian Smith
On Sun, Jun 10, 2012 at 02:35:20PM +0200, Wolfgang Meiners wrote: > Hello, > > i have written a sqlite3-db for a small books library. Within this db > there is a table: > sqlite> .schema ausleihen > CREATE TABLE ausleihen ( > aid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, > pid

Re: [sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-11 Thread Wolfgang Meiners
Am 10.06.12 14:59, schrieb Petite Abeille: > > The short of it is that you can't. SQLite doesn't support such constraints. > Only the basics are supported: primary, unique, referential, not null, check: > Thank you for that information. It saves me a lot of time searching for a solution that

Re: [sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-10 Thread Wolfgang Meiners
Am 10.06.12 14:49, schrieb Guenther Boelter: > On 06/10/2012 08:35 PM, Wolfgang Meiners wrote: >> So my question is: (how) can i write an integrity constraint in sqlite3 >> (version 3.6.12) which is equivalent to the part >> SELECT CASE >> WHEN EXISTS (SELECT * FROM

Re: [sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-10 Thread Petite Abeille
On Jun 10, 2012, at 2:35 PM, Wolfgang Meiners wrote: > So my question is: (how) can i write an integrity constraint in sqlite3 The short of it is that you can't. SQLite doesn't support such constraints. Only the basics are supported: primary, unique, referential, not null, check:

Re: [sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-10 Thread Guenther Boelter
On 06/10/2012 08:35 PM, Wolfgang Meiners wrote: So my question is: (how) can i write an integrity constraint in sqlite3 (version 3.6.12) which is equivalent to the part SELECT CASE WHEN EXISTS (SELECT * FROM ausleihen WHERE (beid =

[sqlite] integrity constraint that is equivalent to the following trigger:

2012-06-10 Thread Wolfgang Meiners
Hello, i have written a sqlite3-db for a small books library. Within this db there is a table: sqlite> .schema ausleihen CREATE TABLE ausleihen ( aid INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, pid INTEGER NOT NULL, beid INTEGER NOT NULL, ausleihdatum DATE NOT