Sysrq147 Sysrq147 - 1 year ago 66
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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download