I am using Spring to connect to the db. I have an interface extending CrudRepository
Here is the query I want execute on the db: SELEC
Can you not use like this?
@Query("SELECT DISTINCT name FROM people p (nolock) WHERE p.name NOT IN (:myparam)")
List findNonReferencedNames(@Param("myparam")List names);
P.S. I write queries in SQL Server 2012 a lot and using nolock
in server is a good practice, you can ignore nolock
if a local db is used.
Seems like your db name is not being mapped correctly (after you've updated your question)