There's no need to do that join manually, since ArcSDE does it implicitly:C:>sdequery -l simple1,shape -w "shape.numofpts = 0"
ArcSDE 10.0 Generic Query Tool Wed Jun 13 08:03:27 2012
------------------------------------------------------------------------
1
OBJECTID: 1
SHAPE: Nil shape
1 row found in 47.00 ms
The ST_GEOMETRY query for a NIL geometry (a shape without vertices) would be:
C:>sdequery -l simple2,shape -w "sde.ST_NUMPOINTS(shape) = 0"
ArcSDE 10.0 Generic Query Tool Wed Jun 13 08:07:14 2012
------------------------------------------------------------------------
1
OBJECTID: 1
SHAPE: Nil shape
1 row found in 281.00 ms
You could also do CLOB manipulation:C:>sdequery -l simple2,shape -w "dbms_lob.substr(sde.ST_ASTEXT(shape),5) = 'EMPTY'"
ArcSDE 10.0 Generic Query Tool Wed Jun 13 09:08:46 2012
------------------------------------------------------------------------
1
OBJECTID: 1
SHAPE: Nil shape
1 row found in 1.15 secs
Upgrade doesn't change storage type -- You'd need to proactively change it ('sdelayer -o migrate')- V