Correcting errors in sqlserver