In jdbc request, I have query where table name should be passed as parameter
Select * from '${b1}'
Below in jdbc request I have Parameter values as tablename1 Variable names as b1
But after executing query I am getting an error - incorrect syntax near '${b1}'
You cannot use a table or database name in a prepared statement
Even if it would be valid you should modify your SQL query to look like:
So instead of using "Parameter values" in the JDBC Request sampler you should set the variable using i.e. User Defined Variables and amend your SQL query to look like:
and JMeter in the runtime will substitute
${b1}JMeter Variable placeholder with its respective value: