db2gse export_shape does not export rows where spatial column contains SQL NULL
When using db2gse export_shape command to export spatial objects , rows containing SQL NULL in spatial column do not export. The GSE2213W message is received.
GSE2213W The geometry to be exported to the file in row "21013" is a null value.
There is no representation of SQL NULL in the shapefile architecture. Therefore rows contains SQL NULL cannot be exported.
Resolving the problem
Replace the SQL NULL with an EMPTY geometry which can be exported to a shapefile.
The Following is an example of replacing SQL NULL with an EMPTY geometry:
db2 "update MYTABLE set MYCOLUMN = db2gse.st_point('POINT EMPTY',1)
where MYCOLUMN = null"
More support for:
DB2 for Linux, UNIX and Windows
Routines (SP & UDF) - SQL
Software version: 9.5, 9.7, 10.1
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Software edition: Advanced Enterprise Server, Enterprise Server, Express, Express-C, Personal, Workgroup Server
Reference #: 1621940
Modified date: 10 August 2013