Hi sebb, WOW! You were EXACTLY right! In the CSV file, I had double-quotes around the table names :(!!! I got rid of the double quotes in the CSV file, and used this in the JDBC request: select count(*) from ${tablename} and it works now :)!! Thanks! Jim -------------------------------------------- On Wed, 12/7/16, sebb wrote: Subject: Re: JDBC request with table name as a variable? To: "JMeter Users List" , "o haya" Date: Wednesday, December 7, 2016, 4:35 AM On 7 December 2016 at 02:18, o haya wrote: > Hi, > > I want to implement at test plan where I am executing "select" statements but against different table names, where the set of table names is in a CSV file. > > Say I have a CSV file: > > table1 > table2 > table3 > > and I run the test plan, then this causes the following: > > select count(*) from table1 > > then the next iteration in the loop does: > > select count(*) from table2 > > then the next iteration in the loop does: > > select count(*) from table3 > > then the next iteration in the loop does: > > select count(*) from table1 > > etc. > > If the CSV file has: > > table10 > table11 > table12 > table13 > > Then I run the test plan it will do: > > select count(*) from table10 > > then the next iteration in the loop does: > > select count(*) from table11 > > then the next iteration in the loop does: > > select count(*) from table12 > > then the next iteration in the loop does: > > select count(*) from table13 > > then the next iteration in the loop does: > > select count(*) from table10 > > etc. > > I tried using > > select count(*) from ${tablename} > > but that appears to become: > > select count(*) from "table1" > > rather than: > > select count(*) from table1 > > Is there a way to do what I'm trying to do with Jmeter? That should work. Are you sure that quotes are added to the table name in the query? Check that they are not present in the input by using the Debug element to display the value of the tablename variable. > Thanks, > Jim > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org > For additional commands, e-mail: user-help@jmeter.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org For additional commands, e-mail: user-help@jmeter.apache.org