I have this query in .sql I am very much new to the spring-boot framework. Is it possible to hit this query from JPA?
What other option do we have to execute SQL statement can I run this query as a native query?
I am just aware of spring-data-jpa but here I didn't find anything how to execute the saved SQL file
INSERT INTO user_lookup (
user_no, user_id, user_name, email_id, address
)
SELECT
user_no, user_id, user_name, email_id, address
FROM(
SELECT
CAST(c.bank AS NUMBER) AS user_no, c.user_id, c.user_name, c.email_id, c.address
FROM user_news c
LEFT JOIN user_sector d
ON d.name = c.user_name
LEFT JOIN user_info e
ON e.name = c.email_id AND
e.user_id = d.id
LEFT JOIN user_lookup f
ON f.user_no = c.user_no
WHERE f.user_no IS NULL
)