Issue with equivalent form of RelateQuery...

Topics: User Forum
Apr 3, 2007 at 7:10 PM
I'm starting to use MsSqlSpatial queries, but I've run into an issue.


FROM ST.RelateQuery('blockgroup', 'the_geom', ST.GeomFromText('POINT(-88.1069831848145 42.0618810653687)',4326), 'Within') AS q
INNER JOIN blockgroup AS t ON q.oid = t.oid

works as expected, the equivalent (and cleaner in my opinion) throws an error:

FROM ST.RelateQuery#dbo#blockgroup#the_geom(ST.GeomFromText('POINT(-88.1069831848145 42.0618810653687)',4326), 'Within')

Msg 4502, Level 16, State 1, Line 1
View or function 'ST.RelateQuery#dbo#blockgroup#the_geom' has more column names specified than columns defined.

I've even taken the select out of ST.RelateQuery#dbo#blockgroup#the_geom and it works as expected, so I'm a little lost why it's not working.

Running 0.1.1 on SP2 on Vista.


Apr 4, 2007 at 9:48 PM
Maybe you've deleted some columns since you imported the data. Try to 1) open ST.RelateQuery#dbo#blockgroup#the_geom ALTER script (double-click it in Management Studio) and execute it to update function metadata, or 2) redeploy MsSqlSpatial.

Best regards,
Ricardo Stuven.