Can you show me what the constraint would look like? Thanks, David
On Sat, 2009-10-10 at 09:11 -0700, Harold Wood & Meyuni Gani wrote: > You can do it as a constraint. > > -----Original Message----- > From: David Bicking <dbic...@yahoo.com> > Sent: Saturday, October 10, 2009 9:08 AM > To: sqlite-users@sqlite.org > Subject: [sqlite] controlling changes > > I have a table: > CREATE TABLE Assets > ( ControlDate Date > , Amt > ) > > Now, the business rules are you can INCREASE the Amt if the Current Date > is the ControlDate in the record. You can DECREASE the amount if the > Current Date is greater than or equal to the ControlDate. > > Can this be enforced via a trigger, or must I enforce that business rule > at the application layer? > > Thanks, > David > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users