There is a table with two columns.
The bit column is either a 1 or 0. I want to update the bit column for every row anytime a new row is added or updated. So if a new row is inserted that is a '0' then every row will update with a '0' in the TrueFalse column. If a '1' is updated in the TrueFalse column, then every row will update to a '1' in the TrueFalse column.
My first inclinations have been hackneyed and quite poor (trigger, cursor, cursor inside a trigger, etc.) so any advice or ideas are appreciated.
asked Feb 02 '11 at 07:28 PM in Default
update the complete records after each insert/update.
answered Feb 02 '11 at 09:30 PM
That is a terrible design! What do you think will happen if you have a million records an are trying to insert another million? The first million record gets updated a million times and all the new record inserted will be updated for each records left!
What business rule are you trying to solve with this design? Give us some more information and we may try to help you solve this in an efficient way.