Add constraint to ensure flag column is <= sum of column in other table
You can use a CHECK constraint defined against a UDF to enforce this, but this comes with many caveats.
You can also define INSERT and UPDATE triggers to do this same work.
In Oracle, you could create a materialized view that joined the two tables together and placed your RSEFlag column next to the appropriate sum.  Then you would apply a CHECK constraint to enforce that RSEFlag &lt;= RSECode_SUM.  This Ask Tom discussion has an example of how to do this. (Search for alter table dept_tot_mvw add constraint and note that dept_tot_mvw is a materialized view.)

Unfortunately, you cannot use this approach since constraints are not allowed on indexed views in SQL Server.