Invalid SQL used for spatial query
----------------------------------

                 Key: GEOT-3803
                 URL: https://jira.codehaus.org/browse/GEOT-3803
             Project: GeoTools
          Issue Type: Bug
          Components: jdbc-teradata plugin
    Affects Versions: 8.0-M1
            Reporter: Ian Schneider
            Assignee: Ian Schneider
             Fix For: 8.0-M2


When a table does not have a primary key (or surrogate) column, invalid SQL is 
used as a predicate for the query.

For example (names changed for anonymity):

2011-08-17 09:28:27,198 DEBUG [org.geotools.jdbc] - SELECT count(*) FROM 
"SCHEMA"."TABLE" WHERE  IN (SELECT DISTINCT  FROM "SCHEMA"."TABLE_idx" t, TABLE 
(SYSSPATIAL.tessellate_search(1,-117.961716, 34.052844, -117.951737, 34.057688, 
-121.000000, 32.000000, -114.000000, 39.000000, 16384, 16384, 1, 0.100000, 0)) 
AS i  WHERE t.cellid = i.cellid) AND "POINT".ST_Intersects(new ST_Geometry(?)) 
= 1



The exception message will be:

Caused by: com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] 
[TeraJDBC 13.10.00.18] [Error 3706] [SQLState 42000] Syntax error: expected 
something between the 'WHERE' keyword and the 'IN' keyword.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to