Skip to main content
added further example and update q.
Source Link
GeorgeC
  • 8.3k
  • 7
  • 56
  • 143

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

UPDATED EXAMPLE enter image description here

WITH DEBUG enter image description here Is there a way in OGR to delete the table or delete the records in the table before overwrite?

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

UPDATED EXAMPLE enter image description here

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

UPDATED EXAMPLE enter image description here

WITH DEBUG enter image description here Is there a way in OGR to delete the table or delete the records in the table before overwrite?

ADDED EXAMPLE
Source Link
GeorgeC
  • 8.3k
  • 7
  • 56
  • 143

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

UPDATED EXAMPLE enter image description here

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

UPDATED EXAMPLE enter image description here

deleted 14 characters in body
Source Link
GeorgeC
  • 8.3k
  • 7
  • 56
  • 143

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', '-overwrite', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', '-overwrite', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

I am running

Command '['C:\\OSGeo4W\\bin\\ogr2ogr.exe', '-progress', '-skipfailures', '-overwrite', '-lco', 'UPLOAD_GEOM_FORMAT=wkt',
 '-t_srs', 'EPSG:28354', '-f', 'MSSQLSpatial', 'MSSQL:Server=xxx;Database=xxxGIS_Test;Trusted_Connect
ion=True', 'D:\\GIS_SourceData\\xxx\\HY_WATERBODY_STATE.tab', '-nln', 'DSE_HY_WATERBODY_STATE']'

But this is appending records to the table in MSSQL instead of overwriting the whole table?

Is there some switch to just tell it to update records/insert new ones or what should I do to get -overwrite to not append?

enter image description here

The _backup view is the original that was just backed up before running the command.

Source Link
GeorgeC
  • 8.3k
  • 7
  • 56
  • 143
Loading