Question

SQL Executor in FME 2013

  • 28 June 2013
  • 3 replies
  • 2 views

Badge +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

Userlevel 2
Badge +17
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
Userlevel 4
Badge +13

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.

Badge +1
Thanx Takashi, Elizabeth, smaccabe.

 

 

Your suggestions helped, I've found the problem.

Reply