Skip to main content
Question

SQL Executor in FME 2013


Forum|alt.badge.img+1
Hi,

 

 

I am using SQL Executor for fetching geometry and associated attributes(stored as a single row records in a table) from a table based on value parameters which I pass to SQLExecutor query, the SQL statement in the SQLExecutor goes like.

 

 

select * from [tablename] where [attribute]=@value[attribute] and [attribute]=@value[attribute]

 

 

When I execute this query to generate attributes to expose it gives me ORA-00936 missing expressions error. But if I continue the execution without it it fetches the desired geometry minus its attributes. If I mention to fetch attributes in the SQL statement instead of *, it fetches the attributes but not the geometry.

 

 

I've tried using Joiner but it doesn't get geometries.

 

 

This transformer is giving me a very hard time, can anybody please help me on this.

 

 

IMRAN

 

 

 

3 replies

takashi
Evangelist
  • June 28, 2013
Hi Imran,

 

 

Although this may be my misunderstanding, there could be trivial errors in your SQL statement.

 

FME does not interpret @value (v is lower case) as function call. If there are @value in the actual SQL statement , try replacing them with @Value (V is upper case).

 

 

Takashi

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • June 28, 2013

Both answers here are correct and should help you resolve the issue you are experiencing.

 

 

1) Remove the "Where ..."  clause when setting the Attributes to expose.  As mentioned changing the SQL Statement here won't affect the previous SQL Statement that you want to hit the database.

 

2) Case Sensitive is the FME.  Try @Value().   

 

 

Worth mentioning you may want to try explicity selecting the geometry column name in the SQL as well but if you are using a Spatial Database Reader the geometry should be returned.


Forum|alt.badge.img+1
  • Author
  • July 1, 2013
Thanx Takashi, Elizabeth, smaccabe.

 

 

Your suggestions helped, I've found the problem.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings