As long as you have a connection to the DB you should be able to do a mass update using the query below. You would need to set up a Connect-SQL rule and place your SQL code on the Update tab. Then to invoke the SQL statement you would use an RDB-Update method in an activity rule.
Don't really know about the second part of your question. I would assume there would be a way to do this however I would recommend trying to figure a way to do this using the standard PRPC rules so that this could be maintained in the future by developers who might not have Java skills.