Skip to Content
0
Apr 18, 2018 at 04:33 PM

DISTINCT with ORDER BY Flexible search query giving error .

2830 Views

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