Skip to main content
Question

SQL Executor in FME 2013

  • June 28, 2013
  • 3 replies
  • 78 views

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

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • 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+22
  • 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.