vijai:
Estoy utilizando el siguiente @Query
anotación para conseguir el primer pocos registro de MS-SQL. Se muestra el error "<operador> o como se esperaba ..."
@Query("SELECT Top 1 * FROM NEVS010_VEH_ACTV_COMMAND C WHERE C.EVS014_VIN = :vin ORDER BY C.EVS010_CREATE_S DESC")
CommandStatus findCommandStatusByVinOrderByCreatedTimestampDesc(@Param("vin") String vin);
vijai:
Dado que la consulta es SQL (y no JPQL) uno tiene que establecer nativeQuery = true
en la anotación:
@Query(nativeQuery = true, value = "SELECT Top 1 * FROM NEVS010_VEH_ACTV_COMMAND C WHERE C.EVS014_VIN = :vin ORDER BY C.EVS010_CREATE_S DESC")
CommandStatus findCommandStatusByVinOrderByCreatedTimestampDesc(@Param("vin") String vin);