Oh, OK. I thought they were in the same table. On Thu, Nov 26, 2015 at 11:56 AM, Simon Slavin <slavins at bigfraud.org> wrote: > > On 26 Nov 2015, at 1:52pm, Bernardo Sulzbach <mafagafogigante at gmail.com> > wrote: > >> I did not mean that. But if you want to check that a certain row has a >> valid value like you described, >> >> check ((job='dealer' or job='agent') or can_discount='no') > > That works only when the "job" column is in the table the constraint is in. > In my case, there are two tables: client and sale. The "job" column is in > the client table, but it's the sale table where I need to know if the client > deserves a discount. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
-- Bernardo Sulzbach