>> What is interesting is that SQL cannot recognize its own parameters.
SQL Server is working correctly. When you use dynamic SQL to issue a command, it is run as a seperate batch. You could think of it as calling another procedure. The second procedure has no visibility to the variables within the calling procedure.
-Mike