I need help to convert oracle SQL to hql : oracle(+) need to convert into join in hql g
SELECT DISTINCT d.school_attended_id, d.document_id, d.appl_year, 'NE' document_type, a.appl_person_id, a.legal_fname, a.legal_lname, a.legal_mname, a.aamc_id, NULL AS evaluator_fname, NULL AS evaluator_mname, NULL AS evaluator_lname, NULL AS change_indicator,s.mod_school_desc, DECODE(dd.last_update,null,'N','Y') previous_dwnld, dd.last_update last_dwnld_dt FROM document d, applicant_person a, designated_school ds, school_attended s, document_download dd WHERE d.appl_year=a.appl_year AND d.appl_person_id=a.appl_person_id AND ds.appl_person_id=a.appl_person_id AND ds.appl_year=a.appl_year AND d.school_attended_id=dd.school_attended_id(+) AND d.appl_year=dd.appl_year(+) AND 123 =dd.med_inst_id(+) AND d.school_attended_id=s.school_attended_id AND d.appl_year=s.appl_year AND (d.doc_delete_ind != 0 OR d.doc_delete_ind IS NULL) AND ds.med_inst_id=123 AND ds.designated_status_cd='A' AND a.appl_status_cd='P' AND d.appl_year=2014 AND d.doc_type_id=5 AND EXISTS (SELECT 1 FROM binary_document WHERE appl_year=d.appl_year AND school_attended_id=d.school_attended_id);
need to convert HQL.
|