I'm looking at an audit table created by a trigger, and we were smart enough to save the
SUSER_NAME(); we have a column called
LastUpdateRef, but not all old code has been updated to use it (it's a unique code to help trace updates back to the code that caused them).
So I know someone is updating, for example,
TerminalId in the
Transaction table. How would I answer this?
Show me all the stored procs that have an update statement on the Transaction table that explicitly change the TerminalId
Seems like this would be beyond any RegEx that would be easy to write.
Some updates statements are in this format, where the table name is after
update a set ArrivalDate = @ArrivalDateLocalTime, LastUpdate = SYSDATETIME(), LastUpdateRef = 'REFGFI168', LastUpdateBy = @UserID from Flight a where etc...