title: JMeter - passing value from First JDBC Request to a Second JDBC Request
body: <p>My Environment: JMeter v2.11, Oracle 12, JDK 7</p>
  
  <p>I have a Jmeter thread in which I'm trying to pass a value from one JDBC Request sampler to another JDBC Request sampler, but when the second JDBC request runs, the result is blank.</p>
  
  <p>I've confirmed the SQL is fine by 1. running the SQL in Oracle Developer, data is returned successfully</p>
  
  <p>I've also confirmed that if I specify the value in Jmeter rather than have it source the value from the 1st sampler - the query returns the result fine</p>
  
  <p>My workings:</p>
  
  <pre><code>JDBC Request 1 --&gt; Query Type: Select Statement 
  select max(appid) from table; Variablename --&gt; appid
  JDBC Request 2 --&gt; Query Type: Prepared Select Statement
  select datevalue from table1 
  inner join table2 on table1.id = table2.id where value = ?; 
  ParameterValue = ${appid}, ParameterType = VARCHAR
  </code></pre>
  
  <p>When I run the both the JDBC Request Samplers - they both report in the View Results Tree Listener successful execution, JDBC Request 1 returns a value in the Response Data, but the result for JDBC Request 2 is blank (value returned is just the datevalue column).</p>
  
  <p><strong>I ran the JDBC Request 2 on its own, it generated the blank result as one would expect after thinking about it - leading me to believe that I'm not successfully passing the ${appid} value from JDBC Request 1 to JDBC Request 2 successfully.</strong></p>
  
  <p>Can anyone please advise what I'm doing wrong?  Or perhaps another method to pass a value from one JDBC Request to another?</p>
  
  <p>I've had a look around and found posts regarding passing values from JDBC to HTTP Requests and also found some very helpful posts (which got me this far), but nothing exactly fitting the scenario I need.</p>
  
  <p>Again, as with all my posts, I am grateful for all advice/help etc.</p>
  
  <p>Cheers</p>