string substitution in a select statement

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

string substitution in a select statement

witsunny
This post has NOT been accepted by the mailing list yet.
I am writing a select stmt as shown below.

<select id="search" statementType="PREPARED" parameterType="java.lang.String" resultType="java.util.Map" flushCache="true">
SELECT * FROM LOG ${value}
</select>

 Object  obj = sqlSession.selectList("logs.util.log.search", " WHERE nodp = 23");

but i am getting this exception. How can i solve this


"
### Error querying database.  Cause: java.sql.SQLException: ORA-00933: SQL command not properly ended

### The error may exist in com/logs/util/log.xml
### The error may involve com.logs.util.Log.search-Inline
### The error occurred while setting parameters
### SQL: SELECT * FROM LOG [C@7fcd7e
### Cause: java.sql.SQLException: ORA-00933: SQL command not properly ended