Skip to content

Instantly share code, notes, and snippets.

@bradbrowne
Created May 10, 2018 07:15
Show Gist options
  • Save bradbrowne/0d8471c1fda6175db3332238536c626c to your computer and use it in GitHub Desktop.
Save bradbrowne/0d8471c1fda6175db3332238536c626c to your computer and use it in GitHub Desktop.
EXEC dbo.Ogr2Ogr @arguments = N' -f "CSV" -overwrite "D:\Flux\Jobs\FluxAssetic\CSV" "MSSQL:server=.;database=Flux;trusted_connection=yes" -t_srs EPSG:4326 -sql "SELECT [Asset Category],[Asset ID],[Asset Name],[Asset Class],[Asset Sub Class],[Asset Type],[Asset Sub Type],[Maintenance Asset Type],[Maintenance Asset Sub Type],Responsibility,[Work Group],[Subdivision Name],[Subdivision Stage Number],[Plan Number],[Date of Construction],Locality,[General Comments],[Ownership Agreement],SP_GEOMETRY FROM [assetic].[Fences]" -lco GEOMETRY=AS_WKT -nln assetic.Fences'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment