Skip to main content
Solved

error ORA-01742 comment syntax

  • July 26, 2016
  • 3 replies
  • 30 views

Forum|alt.badge.img

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?

Best answer by david_r

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

david_r
Celebrity
  • Best Answer
  • July 26, 2016

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


Forum|alt.badge.img
  • Author
  • July 26, 2016

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?


david_r
Celebrity
  • July 26, 2016

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.