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 sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users