SQL
select inttestid,testname
from LAB_TEST_SERVICES
where inttestid in(select inttestid from dbo.LAB_SPECIMEN_MAPPING
union select intprotestid from LAB_PROFILE_TEST_LIST)
and
inttestid not in(select inttestid from LAB_TARIFF_MAPPING);
HQL
String h = "From SERVICES_TYPE_POJO lst where lst.inttestid in(select smp.inttestid from SPECIMEN_MAPPING_POJO smp union select ptl.intprotestid from PROFILE_TEST_LIST_POJO ptl) and lst.inttestid not in(select tmp.inttestid from TARIFF_MAPPING_POJO tmp)";
任何人都可以帮我将SQL更改为HQL。提前谢谢。