title: JDBC RDD Query Statement without '?'
body: <p>I am using Spark with Scala and trying to get data from a database using JdbcRDD. </p>
  
  <pre><code>val rdd = new JdbcRDD(sparkContext,
      driverFactory,
      testQuery,
      rangeMinValue.get,
      rangeMaxValue.get,
      partitionCount,
      rowMapper)
      .persist(StorageLevel.MEMORY_AND_DISK)    
  </code></pre>
  
  <p>Within the query there are no ? values to set (since the query is quite long I am not putting it here.) So I get an error saying that,</p>
  
  <p><em>java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).</em></p>
  
  <p>I have no idea what the problem is. Can someone suggest any kind of solution ?</p>