Skip to main content
Solved

Join tables based on contains, using inlinequery (Code works in Toad, Not in FME)


So I have a multi table joiner that I have been succesful with inside of Toad but I cannot get to excute inside of a SQLite transformer in FME.

 

 

I am essentially wanting to join the Region table to the Entry table if the column Entry.Category contains Region.Region_Name.

 

 

The code I am using is as follows:

 

 

select Entry.Category, REGION.REGION_NAME from Entry join REGION on Entry.Category like ('%' + REGION.REGION_NAME + '%')

 

 

Any help would be very appreciated!

Best answer by takashi

Hi,

Although the SQL syntax is basically standardized, there also are partial differences depending on database engine. In the InlineQuerier, you have to follow SQLite specification, since the transformer uses SQLite database internally.

 

Try using || operator to concatenate string, instead of +.

 

-----

 

select Entry.Category, REGION.REGION_NAME

 

from Entry inner join REGION on Entry.Category like ('%' || REGION.REGION_NAME || '%')

 

-----

 

 

Takashi
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

2 replies

takashi
Influencer
  • Best Answer
  • May 28, 2015

Hi,

Although the SQL syntax is basically standardized, there also are partial differences depending on database engine. In the InlineQuerier, you have to follow SQLite specification, since the transformer uses SQLite database internally.

 

Try using || operator to concatenate string, instead of +.

 

-----

 

select Entry.Category, REGION.REGION_NAME

 

from Entry inner join REGION on Entry.Category like ('%' || REGION.REGION_NAME || '%')

 

-----

 

 

Takashi

  • Author
  • May 28, 2015
Takashi you are the man!!!

 

 

I totally forgot about that as a possibility!!

 

 

Works like a champ now.

 

 

 

-Garrett

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