-
1. Re: problem using Dynamic-SQL in ORDER BY
dsundstrom Sep 27, 2002 1:39 PM (in response to liuqiang_home)You can only order by a path statement, becaused it has to be converted into the actuall columns. Specifically, you can't order by a parameter. Since you are already using DynamicQL, I suggest you just generate a statement instead of passing a parameter. For example: [pre]
String query = "SELECT OBJECT(g) FROM UserInfo g " +
"ORDER BY g." + OrderBY;
[/pre] -
2. Re: problem using Dynamic-SQL in ORDER BY
liuqiang_home Dec 5, 2002 1:15 PM (in response to liuqiang_home)Hi! I have trouble put this query as dynamic QL. can u give me a hint how to use the following query:
String query = "select Object(g) FROM userInfo g" + "Order BY g." + OrderBy
I read the CMP examples, it seems that when I use the Dynamic QL with Set ejbSelectGeneric(String jbossQl, Object[] arguments), the arguments are always required,
while the above query doesnot have any argument, is there other ways to use Dynamic QL without using the ejbSelectGeneric ?
Thanks!
qiang