I'm fairly inexperienced with SQL as a language. I can get buy with simple stuff, but I'm far from a DBA. Right now I've been asked to help a client clean up some pretty major data validity issues in a particular database. Here's the code I'm trying to use:
SQL
Useengage;DECLARE@oldvalvarchar;DECLARE@newvalvarchar;SET@oldval=' ENGINEERING'SET@newval='ENGINEERING'updategagemastsetstorage_loc=@newvalWherestorage_loc=@oldvalupdategagemastsetCURRENT_loc=@newvalWhereCURRENT_loc=@oldval
Unfortunately, I'm doing something wrong here with the variable syntax. If I replace the variables in the UPDATE statements, the query works. As written,...