I have written this query in spring boot, and I am getting this error while building the project. Any help?
@Query("SELECT Appointments.InsuranceBillingSequence"+
"FROM PatientInfo P OUTER " +
"APPLY (SELECT TOP 1 APT.InsuranceBillingSequence FROM [Appointments] APT" +
"WHERE APT.LicenseKey=P.LicenseKey and APT.PatientFID = P.Patient_UID and" +
"APT.Appointment_UID in ?3) Appointments" +
"WHERE P.Id=?1 AND P.LicenseKey=?2")
List<InsuranceDetailsDTO> findPatientInfoWithInsuranceDetails(String id, Integer licenseKey,
List<Integer> visits);
Error:- ast.ErrorCounter:org.hibernate.hql.internal.ast.ErrorCounter.reportError(ErrorCounter.java:60) - line 1:651: unexpected token: OUTER*