Remove sql variables in where clause, and rebuild where clause which is still a valid condition.
removevars.cs
removevars.sql
http://www.sqlparser.com/dl/samples/removevars.zip