I am running my SQL script with st_intersects and got an error.
This is the problematic part:
SELECT pa.pid, aa.aid
FROM addresstable pa, activitytable aa
WHERE sde.st_intersects (pa.shape, aa.shape) = 't';
The error that I got is:
ERROR: ESRI: error changing coordref (SHAPE2) [20011]:
SQL state: 22P02
The SRIDs for both layers are same. (Same ID number when checking with sdelayer -o describe_long command)
So I don't understand why it attempts to change coordref...but if I run this for partial data (i.e WHERE sde.st_intersects (pa.shape, aa.shape) = 't' AND pa.pid <100; ) it worked. pa table has over 150K records if this could be a matter...
Is there any restriction that I need to consider when using the spatial functions in SQL?
I am using PostgreSQL 8.3 with ArcSDE 10 SP2...
Thank you.