Skip to main content

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,

 

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

"TBL_REFRESHUSER" = '@Value(REFRESHUSER)'

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!