Problem with very long SQL and Variables

gitarist

Member
I am using TOracleDataSet and I must select records from Oracle Spatial Table with many coordinate values in my SQL. Since its very long some Oracle Errors are occuring like (ORA:00604, ORA:06550, ..)

SQL Like This :
select A.CODE,A.NAME from MYSPATTABLE A where (SDO_ANYINTERACT(A.GEOM,
SDO_GEOMETRY(2003, 32643, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY( 719798.15780080051600,3171390.11289957399000,719789.07390080962800,3171392.25029964605000,
719518.69620085624000,3171367.67049957113000,719436.40730082581300,3171340.41899964912000,
718834.20230082096500,3171285.91599957738000, ............... ))) = 'TRUE')

There can be 5000 coordinate in SDO_ORDINATE_ARRAY( ... ) And SQL length can be 100KB.

I Tried using Variables but I can not pass Coordinates as Array Variable.

I also tried PL/SQL function but same errors occured.
Can you help me, How can I run this SQL ?
 
Maybe you are reaching the limit of what the Oracle Server can process. Perhaps you can simplify the query and filter out the records on the client?
 
Back
Top