This content has been marked as final.
Show 2 replies
-
1. Re: Dynamic Named Query?
hotat27 Sep 11, 2006 12:16 AM (in response to hotat27)Please help.....
Doesn't anyone expert on this? Please help...
Many thanks in advance..... -
2. Re: Dynamic Named Query?
fhh Sep 14, 2006 6:15 AM (in response to hotat27)<query>select * from address where postcode=:postcode ORDER BY state :ordering </query> query.setParameter("ordering", "ASC")
I have not actually checked ut my first guess would be that you will getselect * from address where postcode=5000 ORDER BY state 'ASC'
which will not work for obvious reasons. Propably the easiest way to solve this is to have two queries and then choose dynamically which one to use.
Regards
fhh