I'm trying to use the WHERE Clause in a FeatureReader. I'm reading in an Oracle SDE featureclass and want to only select those records that match an attribute in a csv file I've loaded. I'm assuming that I have everything setup correctly where the attributes from the csv file are FME Feature Attributes. It seems when I add the @Value(col0) to my WHERE Clause, it breaks. How can I check to make sure it is setup correctly?
Could not find the features in the table 'SCHEMA.TABLE'. One possible reason is that a WHERE clause was specified that references a column/field that does not exist in the table. The error number from ArcObjects is: '-2147216072'. The error message from ArcObjects is: {Underlying DBMS error oORA-01722: invalid number] rSCHEMA.TABLE]}
Attached is my configuration for the FeatureReader and WHERE Clause.
capture.jpg
From the Error message, I take it Col0 maps to a char field. Your where clause in that case should be WHERE <field> = '@Value(col0' . That is including the quotes!
That was simple enough. I was missing the single quotes. Thanks!
From the Error message, I take it Col0 maps to a char field. Your where clause in that case should be WHERE <field> = '@Value(col0' . That is including the quotes!
I am having the same sort of issue in FME 2022 with the feature reader. For regular values such as Ashfield,, the following where clause works fine: NAME IN ('@Value(Rspctve_UG_Name)'). Ashfield being both the value in Rspctve_UG_Name and the value in NAME. But where there is a hyphen, such as PROJECT 406 - LEEDERVILLE, the statement finds no features and I receive the warning above that the where clause has returned no features. How can both scenarios be accommodated?
I should add that for hyphenated values the following does work: NAME IN (@Value(Rspctve_UG_Name)). But it then doesn’t work for non-hyphenated values.