A practical pattern for SQL Server stored procedures that modify production data: default the write gate to 0, and use the ELSE branch to return diagnostic result sets showing exactly what would change before it does.
All in T-SQL
A practical pattern for SQL Server stored procedures that modify production data: default the write gate to 0, and use the ELSE branch to return diagnostic result sets showing exactly what would change before it does.
This is why I structure stored procedures with temp tables instead of variables. It's not about performance. It's not about best practices. It's about getting out of the office on time.
You don't always get to choose your production software. Anytime a professional software product stores a date as a float it seems like someone should get a good scolding. There are rare occasions where a float is a necessary design decision, but that doesn't make it mean you need to enjoy working with that database.