How can I get the actual rows?

Hans 2013-08-14 08:14:30

I get a error : Query execution failed. This syntax is only allowed for parameterized queries. Must declare the scalar variable '@P1'.

Let me refine the question, the sniffed parameters is included in the query plan, and plan explorer knows about it. I only want plan explorer to declare or substitute the variables automatic. I know I can do it manually and then it will work. But could it be done automatic?