When I run this code, I have error with the sql executed on file myQuery.sql
val sqlString = Source.fromFile(**myQuery.sql**).getLines.mkString
var psmt: PreparedStatement = dbc.prepareStatement(sqlString)
var result = psmt.executeQuery()
psmt.close()
myQuery.sql contains big merge query :
MERGE INTO xxxxxx e
USING (SELECT * from ..................)
ON (condition.............)
WHEN MATCHED THEN
UPDATE SET ................
WHEN NOT MATCHED THEN
INSERT (.................)
VALUES (..................)
The error is: Error Msg = ORA-00969: key word ON is missing
But in the query, I have ON key word with condition surrounded by parenthesis
When I execute the query in oracle I don’t have errors
There is any syntax , I shoud resperct il query file ?
Thank you for your help.