Hi,

I am trying to use the JDBCTemplate.query() method to select from a sql view.
I am passing the order by column as an arg inside the query method.

Apparently, it doesnt select using the order by column and returns non-ordered resultset.

return jTemplate.query("select * from my_view_name order by ? desc",new Object[]{"some_col"}, new MyResultSetExtractor());

The same method call works fine if I select from a table (and not a view).

I dont really want to do a replace(? with the column name) in the sql query.

Appreciate the assistance.

Cheers!
Dev