Skip to main content

I am using SQL executor to perform insert command to insert table data into Oracle. I have a column with geometry and data type as SDO_Geometry in already existing oracle table. The current geometry I want to insert into oracle is in UTM format. I have converted it using geometry replacer and reprojector in my workspace.

SQL Executor is throwing an error with too long string literals and can not be inserted.

What is the way that I can insert geometry column with UTM coordinates into Oracle SDO_Geometry column?

It's known limitation in Oracle that you cannot pass string literals longer than 4000 characters in SQL statements, and of course complex geometries can easily go above that limit.

Have you considered using the DatabaseUpdater rather than the SQLExecutor?


It's known limitation in Oracle that you cannot pass string literals longer than 4000 characters in SQL statements, and of course complex geometries can easily go above that limit.

Have you considered using the DatabaseUpdater rather than the SQLExecutor?

I want to insert data into oracle table. I can't see Database Upater have option for that.


Is there any way to insert geometries from sql executor.

 


Sorry, not sure how I got the idea that you were updating rather than inserting.

For simply inserting records, you should look at using the FeatureWriter, probably set to using the Oracle Spatial Object writer. Or have you perhaps already tried it?

 


Sorry, not sure how I got the idea that you were updating rather than inserting.

For simply inserting records, you should look at using the FeatureWriter, probably set to using the Oracle Spatial Object writer. Or have you perhaps already tried it?

 

I have tried Oracle spatial object writer and having issues with inserting another column for sequence so I am using sl executor.


Try using the SQLExecutor to get the next sequence value, then use that in the FeatureWriter. That should work (I've done it several times myself), and you won't need to jump through a lot of hoops to avoid the 4000 character limit in Oracle (I've done that too and it wasn't pretty).


Try using the SQLExecutor to get the next sequence value, then use that in the FeatureWriter. That should work (I've done it several times myself), and you won't need to jump through a lot of hoops to avoid the 4000 character limit in Oracle (I've done that too and it wasn't pretty).

Yes it worked using SQL Executor.


Geometry is safely added to Oracle from Oracle spatial object writer. I used Oracle spatial object writer to add geometry column into the database.


Reply