Philipp Knüsel
2005-05-10 07:50:48 UTC
Hello SQLite Users
Is there a possibility to define variables within trigger definitions?
I would like to to something like this (simplified example):
CREATE TRIGGER Side_Insert AFTER INSERT ON Side
BEGIN
SET LOWDATE = SELECT MIN(Startdate) FROM Basis;
....
INSERT INTO BASIS (Name,Startdate) VALUES ("Trigger", LOWDATE);
END;
I know, there is the possibility to do the same with SUBSELECTS,
but I'm looking for something easier/faster/more elegant than doing the
same subselect several times.
(as my real example is more complicated)
Even if there is no possibility right know, I would probably suggest
this as a feature for the future.
Thanks a lot!
Philipp
Is there a possibility to define variables within trigger definitions?
I would like to to something like this (simplified example):
CREATE TRIGGER Side_Insert AFTER INSERT ON Side
BEGIN
SET LOWDATE = SELECT MIN(Startdate) FROM Basis;
....
INSERT INTO BASIS (Name,Startdate) VALUES ("Trigger", LOWDATE);
END;
I know, there is the possibility to do the same with SUBSELECTS,
but I'm looking for something easier/faster/more elegant than doing the
same subselect several times.
(as my real example is more complicated)
Even if there is no possibility right know, I would probably suggest
this as a feature for the future.
Thanks a lot!
Philipp