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