Skip to main content
Question

SQL Executor Update Statement issue

  • September 13, 2019
  • 2 replies
  • 137 views

Forum|alt.badge.img+1

Hi, I am trying to run an SQLExecutor transformer with the following SQL:

FME_SQL_DELIMITER ;
UPDATE "PROJECTS"
SET "TBL_REFRESHDATE" = '16-JAN-2020',    
    "TBL_REFRESHUSER" = @Value(REFRESHUSER);
COMMIT;

When I run this I get the following error message

|ERROR |An error occurred while accessing a table result for feature type `'; message was `Execution of statement `UPDATE "PROJECTS"

 

SET "TBL_REFRESHDATE" = '16-JAN-2020',

 

    "TBL_REFRESHUSER" = TEST' did not succeed; error was `ORA-00904: "TEST": invalid identifier'. 

Where TEST is the value which is currently in the TBL_REFRESHUSER column in the table, not the value which I am trying to populate the column with (ie: 'test_user').

However, when I run the following SQL, replacing @Value(REFRESHUSER) with a hard coded string of 'test_user', the script works:

FME_SQL_DELIMITER ;
UPDATE "PROJECTS"
SET "TBL_REFRESHDATE" = '16-JAN-2020',
    "TBL_REFRESHUSER" = 'test_user';
COMMIT;

What do I need to do to get the attribute values to be read properly inside the SQLExecutor?  The REFRESHUSER attribute is definitely a string so I don't know why it is not being read in.

I am using FME Desktop 2019.1

Thanks,

 

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.

2 replies

david_r
Celebrity
  • 8394 replies
  • September 13, 2019

You need to put single quotes around your string, FME won't do it for you. Example:

"TBL_REFRESHUSER" = '@Value(REFRESHUSER)'

Forum|alt.badge.img+1
  • Author
  • 271 replies
  • September 13, 2019

You need to put single quotes around your string, FME won't do it for you. Example:

"TBL_REFRESHUSER" = '@Value(REFRESHUSER)'

Thanks that's perfect!