(on FME 2020.2)
Hi,
I have a workspace with an Oracle reader in which I want to filter the features to read with a WHERE clause on a column, let's say COLUMN_A.
I created a Choice type published parameter named colA, which contains the possible values for this column.
This way I can filter the features from my table when COLUMN_A contains the value selected in the Choice list.
The WHERE clause is :
"COLUMN_A" = '$(colA)'
Quotes character are used to handle the values with spaces.
Problem : the values can contains the quote character as well !
What is expected for the database (Oracle) is that the simple quote in the value should be doubled. For exemple the colA value TES'T should be transformed to TES''T.
I tried to find a way to replace the simple quotes with two quotes in the WHERE clause using SQL string functions, without success because it always require to have the doubled quote.
The only workaround I found for the moment is to change the Choice parameter to a Choice with alias parameter and double the quotes in the Value but not in the Display name.
Which causes other problems later in the workspace because I need the value without the double quotes (so I have to replace the double quotes to single quote in these cases).
Do you have an idea how I can double the quotes only for the WHERE clause of the Oracle reader and this way avoid to have a Choice with alias but only a Choice parameter ?