anchor.diff:            //t2 := '';
             Result := aTablePrefix+t1+' t1';
             aShapePrefix := 't1.';
  +          aObjectIDPrefix := aShapePrefix;
           end;
         end;
       end;
  
positive.code:           'FROM '+join+' '+
            'WHERE ';
          if JOINCONDITION<>''
            then Result := Result+ JOINCONDITION +' AND ';
          Result := Result +ShapePrefix+'OBJECT_ID in ';
        end;
    else
      Result :=
        'SELECT '+ShapePrefix+'OBJECT_ID, '+
          VALUE_EXPR+' AS VALUE, '+
          ShapePrefix+'SHAPE '+
        'FROM '+join+' '+
        'WHERE ';
      if JOINCONDITION<>''
        then Result := Result+ JOINCONDITION +' AND ';
      Result := Result +ShapePrefix+'OBJECT_ID in ';
    end;
  end;
  
  
negative.code:       begin
          Result :=
            'SELECT '+
              ObjectIDPrefix+'OBJECT_ID, '+
              VALUE_EXPR+' AS VALUE, '+
              ShapePrefix+'SHAPE '+
            'FROM '+join;
          if JOINCONDITION<>''
          then Result := Result+' '+
            'WHERE '+PreJoin+JOINCONDITION;
        end;
      5, 9:
        begin
          Result :=
            'SELECT '+
              ObjectIDPrefix+'OBJECT_ID, '+
              VALUE_EXPR+','+
              TEXTURE_EXPR+','+
              ShapePrefix+'SHAPE '+
            'FROM '+join;
          if JOINCONDITION<>''
          then Result := Result+' '+
            'WHERE '+PreJoin+JOINCONDITION;
        end;
      21:
        begin
          Result :=
            'SELECT '+
              ObjectIDPrefix+'OBJECT_ID, '+
              ShapePrefix+'shape.sdo_point.x, '+
              ShapePrefix+'shape.sdo_point.y, '+
              ShapePrefix+'poiType, '+
  