Tuesday, June 28, 2011

ArcSDE/Postgres Error 000210, Could not Copy Features

It seems like there is an out of the box error in ArcSDE which causes geodatabase operations like Import Feature to fail out of the box (giving a 000210 error, Could not Copy Feature). In my case, it was because my db user name "postgres", which is usually a default, was not included as a schema in the deafault database. This might be solved by calling the user "sde", but in my case I solved it by simply creating a new schema in the default database beside the existing sde schema.

Tuesday, June 14, 2011

postgres max integer in an alphanumeric column

select max(to_number(substring(COLUMNNAME from '([0-9].*)'),'99999')) from TABLENAME

removes letters from a mixed column ... can be used for generating a new id