Skip to Content
0
Jun 03, 2018 at 12:05 AM

Flexible Search Query in Java

456 Views

Hi All,

I Tried to write below query in Java code but its not working.

String B2B_CUSTOMERS = "select distinct {u.uid} userid, " + " replace({u.name},',',' ')name," + "{u.email}email," + " to_char(({u.lastlogin}),'mm/dd/yyyy HH24:MI:SS')last_login," + "to_char(({u.creationtime}),'mm/dd/yyyy HH24:MI:SS')creation_time," + "to_char(({u.modifiedtime}),'mm/dd/yyyy HH24:MI:SS')modified_time," + "to_char((max({o.creationtime})),'mm/dd/yyyy HH24:MI:SS') last_order_creation_date" + " from {" + "b2bcustomer as u " + "LEFT OUTER JOIN order as o ON {o.user} = {u.pk}" + "}" + "where" + "{u.active}='1' and " + "{u.creationtime} between ?startDate and ?endDate " + "group by {u.uid},{u.name},{u.email},{u.lastlogin},{u.creationtime},{u.modifiedtime}";

Can anyone suggest me why its not working and throwing below exception :

.FlexibleSearchException: SQL search error - enable the property 'flexible.search.exception.show.query.details'.

Thanks in Advance ...........

Regards,