I am doing a left join and I'd like to update a Boolean column in the left table based on whether a value in the right table is null or not. I can do this with an update with join but I cannot figure out how to make it happen automatically (use a trigger?) on an ongoing basis. My goal is to have a .NET webworm that shows the Boolean column as a read-only checked box.I've heard that triggers should be avoided. What can I do instead?Example:Left table L1 in join:ID (identity)lastname, firstname, DOB,ACGBoolean, col3,...,colnRight table R1 in join:lastname, firstname, DOB, cola, cola,...,colaif R1.lastname is not null, L1.ACGBoolean should be set to 1(true).How can I set L1.Boolean = 1 automatically as new rows are added to the left or right tables based on whether there is a match between the left and right tables?Please let me know if this isn't clear. I've been thinking about this most of today but I seem to have a mental block. Thanks in advance.
↧