Black, Michael (IS) <michael.bla...@ngc.com> wrote: > I couldn't get your trigger to work properly on deleting an empty album...it > still said "cannot be deleted". > > I ended up modifying it some..dont' know if this is your cause or not but > might be worth a try to modify your trigger. > > SELECT RAISE(FAIL,'album has songs cannot be deleted') > WHERE (SELECT count(album_fk) FROM songs WHERE (album_fk = OLD.id) > 0);
Or simply where old.id in (select album_fk from songs) -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users