Skip to main content
Solved

Updating attribute from mdb to sde with SQL Executor

  • June 6, 2014
  • 1 reply
  • 17 views

Hi,

 

 

I have an attribute that I would like to update in my oracle sde table (polylines) with data from an mdb table (points).

 

 

I have tried using SQL Executor to do so, but it seems to only read data and not actually update anything.

 

 

Here is the SQL statement I am currently using:

 

 

update SPATIAL.WTRSERVICECONNECTIONS set lot_link = '@Value(LOT_LINK)' where facilityid = '@Value(FACILITYID)'

 

 

Essentially, I would like to update the lot_link attribute in my WTRSERVICECONNECTIONS sde table (polylines) with the LOT_LINK data from my mdb table (points) where they share the same FACILITYID.

 

 

Even though the mdb contains data for points and the sde is for polylines, is it still possible to update the attribute (lot_link) in the sde based on matching ID? If it is, is there something that I'm missing in my SQL statement, or should I be using a different transformer for this task?

 

 

Best answer by david_r

Hi,

 

 

it looks like you're doing this correctly, I would've done it the same way.

 

 

Some suggestions for debugging:

 

 

- make sure that the fields lot_link and facilityid both are varchar2 and not, let's say, integers.

 

 

- look in the FME log window, it will echo the first call made by the SQLExecutor. Copy and paste the command into something like SQLDeveloper and execute manually to see what happens.

 

 

- Insert an inspection point just before the SQLExecutor and check that the attributes LOT_LINK and FACILITYID contains something meaningful and check for the precense of FACILITYID in WTRSERVICECONNECTIONS.

 

 

David
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.

1 reply

david_r
Celebrity
  • Best Answer
  • June 7, 2014
Hi,

 

 

it looks like you're doing this correctly, I would've done it the same way.

 

 

Some suggestions for debugging:

 

 

- make sure that the fields lot_link and facilityid both are varchar2 and not, let's say, integers.

 

 

- look in the FME log window, it will echo the first call made by the SQLExecutor. Copy and paste the command into something like SQLDeveloper and execute manually to see what happens.

 

 

- Insert an inspection point just before the SQLExecutor and check that the attributes LOT_LINK and FACILITYID contains something meaningful and check for the precense of FACILITYID in WTRSERVICECONNECTIONS.

 

 

David