I have a sql query like this.
select \"DEPT\".\"DEPTNO\" as \"DEPTNO1\",
\"DEPT\".\"DNAME\" as \"DNAME1\",
\"DEPT\".\"LOC\" as \"LOC1\",
\"EMP\".\"COMM\" as
You created a Query with bind variable and you never set it.
Use OraclePreparedStatement
and its method setStringAtName()
statement.setStringAtName("DeptNo","<>");
If not OraclePreparedStatement
, you can just put it as ?1
in your Query string
and use,
statement.setString(1,"<>");
If in case, you don't know how many bind variables you get, you have capture the bind variables in a map and prepare a list and set it accordingly!
Else your requirement is unachievable!