hibernate - Using distinct with Column Value within Constructor Query of HQL -
i want retrieve records based on distinct lab number database. problem have there multiple labs taken patient , multiple lab numbers stored in joined tables.
here query:
select distinct new org.laborders.dto.laborderdto(ps.labnumber,ps.patientserviceid, ps,patientname,pso.patientserviceorderid,pso.totalamount) patientservices ps join patientservicesorder pso i want retrieve unique records on ps.labnumber.
have tried -
select distinct new org.laborders.dto.laborderdto(ps.labnumber,ps.patientserviceid, ps,patientname,pso.patientserviceorderid,pso.totalamount) patientservices ps join patientservicesorder pso look have placed keyword distinct first , new package.class.
Comments
Post a Comment