Sysrq147 Sysrq147 - 11 months ago 53
SQL Question

"Must declare the table variable"

I am trying to get this code working in Visual Basic:

In a

I have try this SQL command:

SELECT * FROM @Parameter1

I have created
in my ReportViewer but I get error :

Must declare the table variable

Any help?

Answer Source

You cannot use a parameter to specify the name of a Table or the name of fields.
Parameters could only be used to express the values in a WHERE clause for a SELECT/DELETE/UPDATE or for the values passed to an INSERT/UPDATE statement