on ‎2018 Apr 18 5:33 PM
Hi,
Try to execute below query in code and from HAC, but giving error.Please help me.
Query :
SELECT DISTINCT {customer:uid} FROM {B2BCustomer AS customer JOIN PrincipalGroupRelation AS pg ON {customer:pk}={pg:source} JOIN B2BUnit AS bu ON {pg:target}={bu:pk} JOIN UserTypeEnum AS userTypeEnum ON {customer:userType}={userTypeEnum:PK}} WHERE {userTypeEnum:code}='CUSTOMER' AND {bu:uid} IN ('100418') ORDER BY {customer:creationtime} DESC
Error:
org.hsqldb.HsqlException: invalid ORDER BY expression
Request clarification before answering.
Probably, you have a exception "invalid order by expression" because you specify a column in ORDER BY that are not explicit returning in SELECT clause
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nagajuna,
You need to include the creationtime in the SELECT area.
Inner Query:
SELECT {customer:uid} AS ID, {customer:creationtime}
...
ORDER BY {customer:creationtime} DESC
AS id_creation
You can then SELECT DISTINCT ID FROM id_creation in the Wrapper Query.
Regards,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.