I want to run this query from JPA from my code. But its not working.
Please help.
SET IDENTITY_INSERT \"+tableName+\" ON
UP
You don't want quotes around the table name.
="SET IDENTITY_INSERT "+tableName+" ON"