>> I am trying to load a table using a parameter to specify the table name:
>>
>> <select id="selectAllFromTable" parameterType="String"
>> resultType="hashmap">
>> select * from #{id}
>> </select>
>>
>>
> select * from ${id}
>
Thank you for the fast reply. I'm now onto a new error:
ERROR main Slf4jImpl.error - Error calling Connection.prepareStatement:
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "null" at line
1, column 15.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source)
My mapper interface is:
List<Map> selectAllFromTable(RowBounds rowBounds, String tableName);
And I am calling it with:
String tableName = "Table";
List<Map> rows = mapper.selectAllFromTable(rowBounds, tableName);
Any further ideas?
Thanks,
Tom
--
View this message in context:
http://old.nabble.com/table-name-as-parameter-tp27505213p27505434.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org