On 1 Nov 2013, at 4:59am, Igor Korot wrote:
> I'm not sure I understand.
> Are you saying that I don't have to populate the rank in the table on
> insertion?
Yes.
>> Given your description above, why try to get all the ranks right every time
>> you do an INSERT ?
>
> Because right after ins
Simon,
On Thu, Oct 31, 2013 at 9:39 PM, Simon Slavin wrote:
>
> On 1 Nov 2013, at 4:15am, Igor Korot wrote:
>
>> I'm not trying to change an order of my rows.
>> Look at it this way:
>> I have a league with some teams. When the league is created the
>> players needs to be put in from the players
On 1 Nov 2013, at 4:15am, Igor Korot wrote:
> I'm not trying to change an order of my rows.
> Look at it this way:
> I have a league with some teams. When the league is created the
> players needs to be put in from the players pool. In order to assign
> the rank inside the league I am inserting
Simon,
On Thu, Oct 31, 2013 at 8:51 PM, Simon Slavin wrote:
>
> On 1 Nov 2013, at 2:15am, Igor Korot wrote:
>
>> When the record is inserted with the field1 as NULL, I want to have
>> the field1 to have value max( field1 ) + 1.
>> When the record inserted have some value in field1, i.e. field1 =
On 1 Nov 2013, at 2:15am, Igor Korot wrote:
> When the record is inserted with the field1 as NULL, I want to have
> the field1 to have value max( field1 ) + 1.
> When the record inserted have some value in field1, i.e. field1 == 5,
> I want all records that have field1 > 5 to have field1 to be
>
ssus.com]
>Sent: Thursday, 31 October, 2013 21:27
>To: 'General Discussion of SQLite Database'
>Subject: RE: [sqlite] TRIGGER syntax
>
>
>https://www.sqlite.org/lang_createtrigger.html
>
>CREATE TRIGGER foo AFTER INSERT ON table
>BEGIN
> UPDATE table
>SET
On 10/31/2013 11:26 PM, Keith Medcalf wrote:
https://www.sqlite.org/lang_createtrigger.html
CREATE TRIGGER foo AFTER INSERT ON table
BEGIN
UPDATE table
SET field1 = field1 + 1
WHERE new.field1 IS NOT NULL
AND field1 > new.field1;
UPDATE table
SET field1 = (SELECT MAX(field
AND new.field1 IS NULL;
END;
>-Original Message-
>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
>boun...@sqlite.org] On Behalf Of Igor Korot
>Sent: Thursday, 31 October, 2013 20:16
>To: General Discussion of SQLite Database
>Subject: Re: [sqlite] TRIGGER syntax
&g
Igor,
On Thu, Oct 31, 2013 at 5:33 PM, Igor Tandetnik wrote:
> On 10/31/2013 8:22 PM, Igor Korot wrote:
>>
>> Hi, ALL,
>> In the CREATE TRIGGER can I use something like this:
>>
>> CREATE TRIGGER foo AFTER INSERT
>> BEGIN
>> IF foo.field1 IS NULL
>> UPDATE foo SET field1 = ;
>>
On 10/31/2013 8:22 PM, Igor Korot wrote:
Hi, ALL,
In the CREATE TRIGGER can I use something like this:
CREATE TRIGGER foo AFTER INSERT
BEGIN
IF foo.field1 IS NULL
UPDATE foo SET field1 = ;
ELSE
UPDATE foo SET field1 = field1 + 1 WHERE field1 > new.;
END;
My
Hi, ALL,
In the CREATE TRIGGER can I use something like this:
CREATE TRIGGER foo AFTER INSERT
BEGIN
IF foo.field1 IS NULL
UPDATE foo SET field1 = ;
ELSE
UPDATE foo SET field1 = field1 + 1 WHERE field1 > new.;
END;
My concern is if CREATE TRIGER will understand co
Am 04.06.12 19:36, schrieb Igor Tandetnik:
>
> http://sqlite.org/lang.html
> http://sqlite.org/syntaxdiagrams.html
>
I just found the case expression. I did not know it before. Thank you
for pointing me to that direction!
Wolfgang
___
sqlite-users mail
Am 04.06.12 19:31, schrieb Michael Schlenker:
> Am 04.06.2012 19:25, schrieb Wolfgang Meiners:
>> Am 04.06.12 18:59, schrieb Igor Tandetnik:
>>> On 6/4/2012 12:33 PM, Wolfgang Meiners wrote:
this trigger does work but i think it is not in accordance with the
syntax diagram of TRIGGER on
>
On 6/4/2012 1:25 PM, Wolfgang Meiners wrote:
Am 04.06.12 18:59, schrieb Igor Tandetnik:
On 6/4/2012 12:33 PM, Wolfgang Meiners wrote:
this trigger does work but i think it is not in accordance with the
syntax diagram of TRIGGER on
http://sqlite.com/lang_createtrigger.html
Which part do you fe
Am 04.06.2012 19:25, schrieb Wolfgang Meiners:
> Am 04.06.12 18:59, schrieb Igor Tandetnik:
>> On 6/4/2012 12:33 PM, Wolfgang Meiners wrote:
>>> this trigger does work but i think it is not in accordance with the
>>> syntax diagram of TRIGGER on
>>> http://sqlite.com/lang_createtrigger.html
>>
>> W
Am 04.06.12 18:59, schrieb Igor Tandetnik:
> On 6/4/2012 12:33 PM, Wolfgang Meiners wrote:
>> this trigger does work but i think it is not in accordance with the
>> syntax diagram of TRIGGER on
>> http://sqlite.com/lang_createtrigger.html
>
> Which part do you feel is in violation of the diagram?
On 6/4/2012 12:33 PM, Wolfgang Meiners wrote:
this trigger does work but i think it is not in accordance with the
syntax diagram of TRIGGER on
http://sqlite.com/lang_createtrigger.html
Which part do you feel is in violation of the diagram?
--
Igor Tandetnik
Hi,
I have written the following trigger with ideas from stackoverflow:
(OSX 10.6.8, SQLite 3.6.12)
This is for a book library. If i delete a bookexemplar from the library,
this should not be possible if this bookexemplar is on loan, which means
ausleihen.rueckgabe IS NULL. Otherwise every infor
18 matches
Mail list logo