Skip to main content
Solved

Updating attribute from mdb to sde with SQL Executor

  • June 6, 2014
  • 1 reply
  • 7 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
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.

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

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