What you have done is basicaly:SELECT *FROM TableNameWHERE Scope between ABC and CX03
What is the datatype of ABC? I assume it's a string. And how do you denote a string in sql? With single quotes. So, in order to do what you are trying to do you would need to adjust your string so that it generates something like:SELECT *FROM TableNameWHERE Scope between 'ABC' and 'CX03'
Even that won't work, because SQL will not evaluate a variable in a WHERE clause as an expression, hence the error you are receiving.But the real question is, WHAT are you trying to accomplish? Perhaps using the sp_executesql stored procedure and passing the parameters would be a better choice.?.?There is an article right off the SqlTeam home page that talks about using the sp_executesql stored procedure:http://www.sqlteam.com/article/using-dynamic-sql-in-stored-procedures