Solved

error ORA-01742 comment syntax


Badge

I'm using a SqlExecutor deleting some data in a Oracle database.

FME_SQL_DELIMITER ;
--feuille 1
DELETE FROM G_ADT_AGRI.EXP_INVEST WHERE OBJECTID = @Value(OBJECTID);
/*
--feuille 2
DELETE FROM G_ADT_AGRI.FON_BATI WHERE OBJECTID = @Value(OBJECTID);*/

As you can see I commented the "feuille2" part. But I have this error message : 

An error occurred while accessing a table result for feature type `QueryFactory_SQLExecute'; message was `Execution of statement `/*

--feuille 2

DELETE FROM G_ADT_AGRI.FON_BATI WHERE OBJECTID = 699' did not succeed; error was `ORA-01742: comment not terminated properly

Although I use the right comment syntax. What did I miss?

icon

Best answer by david_r 26 July 2016, 09:27

View original

3 replies

Userlevel 4

The SQLExecutor (or the Oracle driver, I'm not sure) doesn't like comments. Remove the comments and it should work.

Badge

The SQLExecutor (or the Oracle driver, I'm not sure) doesn't like comments. Remove the comments and it should work.

Indeed if I remove the /*...*/, it's fine. Thanks.

It seems that is the Oracle driver because with a Postgresql database, it works.

Is that a known bug in Safe?

Userlevel 4

Indeed if I remove the /*...*/, it's fine. Thanks.

It seems that is the Oracle driver because with a Postgresql database, it works.

Is that a known bug in Safe?

Not sure, but the issue has been mentioned here before.

Reply