How come my sqlite can't recognize this statement? It's not showing as completed and I don't see why.
Using 3.7.9 with default options. sqlite> CREATE TRIGGER tableA _InsertUpdate ...> AFTER INSERT ...> ON tableA ...> begin ...> update tableB ...> set ...> [LowestTime] = CASE WHEN ( [LowestTime] IS NULL ) OR ...> ([LowestTime]> TIME(NEW.TimeStamp)) THEN TIME(NEW.[TimeStamp]) ELSE [LowestTime] END ...> end; ...> Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ________________________________ From: [email protected] [[email protected]] on behalf of Steffen Mangold [[email protected]] Sent: Tuesday, November 22, 2011 2:44 PM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] Time comparisen and CASE WHEN Now I fixed it. CREATE TRIGGER tableA _InsertUpdate AFTER INSERT ON tableA begin update tableB set [LowestTime] = CASE WHEN ( [LowestTime] IS NULL ) OR ([LowestTime]> TIME(NEW.TimeStamp)) THEN TIME(NEW.[TimeStamp]) ELSE [LowestTime] END end; ... THEN TIME(NEW.[TimeStamp]) - was the key. If I format a field with "type" 'time' my sqlite db tool only show me the time, even if I put in a hole datetime. But I seems that sqlite also wrote the hole datetime in the field! THANK YOU IGOR!!!!! _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

