Skip to main content
Question

Inlinequerier UPDATE statement not returning any data?

  • December 17, 2015
  • 8 replies
  • 21 views

Forum|alt.badge.img

Hello,

I have found out that UPDATE statement used in inlinequerier does not return any data even though translation runs successfully. I need to update one column of my table with data from another table and there are more conditions in the update statement, otherwise I would have just overwritten the column using feature merger.

When I try to do the update, and add another statement I get an error "Unable to execute multiple statements at a time" (guess this is SQLite limitation)

If I try to select this updated data in another output port (after this update port) it is not updated as it should be.

Any idea how to make this work?

Thanks,

Radek

8 replies

david_r
Celebrity
  • December 17, 2015

How about using the SQLExecutor? It's pretty powerful.

You can even generate the SQL statement in your workspace before passing it on to the SQLExecutor.


Forum|alt.badge.img
  • Author
  • December 17, 2015
david_r wrote:

How about using the SQLExecutor? It's pretty powerful.

You can even generate the SQL statement in your workspace before passing it on to the SQLExecutor.

I would have used it, but the data I am accessing is read only and even if it was, I would like to update the data only locally on my computer.


takashi
Influencer
  • December 17, 2015

I think that the InlineQuerier was designed only for querying data with SELECT statement. Here is a similar discuss: Update a table using InlineQuerier

Consider using other transformers to modify the features.


mark2atsafe
Safer
Forum|alt.badge.img+44
  • Safer
  • December 17, 2015

No the InlineQuerier doesn't work on Update commands. I will mention that the FeatureMerger does allow multiple join 'statements', so you could do the equivalent of "where a.attribute1=b.attribute1 and a.attribute2=b.attribute2 and etc". Use the "+" button at the foot of the dialog to add more clauses.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 17, 2015

Have you tried using the DatabaseUpdater?

In FME 2016 the FeatureWriter transformer hopefully has the possibility to write to a database using the UPDATE parameter or even the fme_db_operation attribute to do just this.


david_r
Celebrity
  • December 17, 2015
erik_jan wrote:

Have you tried using the DatabaseUpdater?

In FME 2016 the FeatureWriter transformer hopefully has the possibility to write to a database using the UPDATE parameter or even the fme_db_operation attribute to do just this.

I'm not sure how the DatabaseUpdater would work when the SQLExecutor apparently wouldn't in his scenario, though.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • December 17, 2015
david_r wrote:

I'm not sure how the DatabaseUpdater would work when the SQLExecutor apparently wouldn't in his scenario, though.

If it is because of the data being Read only, no scenario would update the data. That is the purpose of Read only data.


david_r
Celebrity
  • December 17, 2015
erik_jan wrote:

If it is because of the data being Read only, no scenario would update the data. That is the purpose of Read only data.

I understand the concept of read only data, but I'm not sure I understand what you mean :-)


Reply


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