Я использую собственный запрос в своем хранилище. Но у меня есть эта ошибка:
java.sql.SQLSyntaxErrorException: ORA-00923: mot-clé FROM absent à l'emplacement prévu
Вот мой класс хранилища:
@Repository
public interface SdiworkitemRepository extends JpaRepository<Sdiworkitem, String> {
@Query(value = "select keyid1 as sampleid, sstudyid as sstudyid," +
"IBBL_MISC.FindParent(keyid1) as parentSampleID, " +
"(select sampletypeid from s_sample where s_sample.s_sampleid = IBBL_MISC.FindParent(keyid1)) as parentSampleType," +
"u_batchid as batchId, workitemid as test_method, workiteminstance as instance, workitemstatus as test_method_status ,u_testresult as test_result," +
"u_approvaldt as approval_date,u_approvalby as approvalby,s_retestedflag as retested,sdiworkitem.createdt as test_creation_date_in_the_LIMS," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'AssayProtocol', workiteminstance) as AssayProtocol," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'AssayProtocolVersion', workiteminstance) as AssayProtocolVersion," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'Analyst', workiteminstance) as Analyst," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'IBBL-Code', workiteminstance) as IBBL-Code," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'DateOfAnalysis', workiteminstance) as DateOfAnalysis," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'RunAcceptance', workiteminstance) as RunAcceptance," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'ProtocolFile', workiteminstance) as ProtocolFile," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'ProtocolTitle', workiteminstance) as ProtocolTitle," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'M007', 'DNA sample conc', workiteminstance) as DNA_sample_conc," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'M007', 'Ratio 260/280', workiteminstance) as Ratio_260_280," +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'M007', 'Sample Acceptance', workiteminstance) as SampleAcceptance " +
" FROM sdiworkitem, s_sample where " +
"sdiworkitem.keyid1 = s_sample.s_sampleid and " +
"s_sample.s_sampleid like :x and " +
"sdiworkitem.workitemid = 'M007_96well_DNA' and" +
"(" +
"(" +
"sdiworkitem.createdt >= to_date('20190101', 'YYYYMMDD') and " +
"sdiworkitem.createdt <= to_date('20191231', 'YYYYMMDD') " +
")" +
" or " +
"IBBL_MISC.GetSdiDataItem(keyid1, workitemid, 'CommonParameters', 'DateOfAnalysis', workiteminstance) like '%-19%'" +
")" +
"order by sdiworkitem.createdt asc", nativeQuery = true)
public Map<String, Object> checkNative(@Param("x") String keyId1);
У кого-то есть идея об этой ошибке? Кажется, у меня есть ошибка в моем SQL синтаксисе, но когда я запускаю этот sql в SQLDeveloper, нет ошибки