A previous developer placed a static string called "Qry" in a "god" class in a project I inherited.
The developer then used this static variable in every single place throughout the program that a single db query string is built and used.
For instance:
SomeGodClass.Qry = "select count(1) from AddressBook where Name = '" + txtName.Text.Trim(' ') +
"' and Group_Name = '" + txtGroupName.Text.Trim(' ') + "'";
int count = sqlHelper.ExecuteScalar(SomeGodClass.Qry);
Thus, this variable is referenced exactly 626 times, most with a different query being assigned. There are other static variables like this that he used - probably 50 of them - but this is the most predominant.
My first instinct is to remove this static string and rework all 626 usages. However, I don't know if this is a bad enough practice to take the time to do it.
Thus, my question is: Is this an acceptable use of a static string, especially when taking into consideration the amount of work refactoring would take?