Skip to content

Tag: spring-jdbc

Error while getting sql record using EntityManager

I am using EntityManager in spring boot app to get result from this query Its giving me correct output in PgAdmin but in java code List resultList = em.createNativeQuery(str).setParameter(1, sectionId ).getResultList(); Giving error ERROR: syntax error at or near “:” its breaking at data::jsonb .H…

datetime conversion to Java in SQLServer 2016

I have a scenario where I have a table that has a date field with the datetime property. In the documentation (https://learn.microsoft.com/en-us/sql/connect/jdbc/using-basic-data-types?view=sql-server-ver15) : Note that java.sql.Timestamp values can no longer be used to compare values from a datetime column s…