There should be a way to import records to an existing table.
Scenario provided by user jmace:
"I have an application where users want to be able to upload and edit shapefile data. I am trying to determine what would be the best way to do this. The shapefile will relate to other data stored in a SQL Server 2000 database. Most of the DBAs that I talk to cringe when I tell them that every time you upload a shapefile it creates its own unique table. This application could have many users uploading shapefiles, so the number of tables could grow very quickly. "
Additionally, it should provide a way to insert default values for other fields, eg. "username".
Comments: ** Comment from web user: rstuven **
Scenario provided by user jmace:
"I have an application where users want to be able to upload and edit shapefile data. I am trying to determine what would be the best way to do this. The shapefile will relate to other data stored in a SQL Server 2000 database. Most of the DBAs that I talk to cringe when I tell them that every time you upload a shapefile it creates its own unique table. This application could have many users uploading shapefiles, so the number of tables could grow very quickly. "
Additionally, it should provide a way to insert default values for other fields, eg. "username".
Comments: ** Comment from web user: rstuven **
Added append_rows argument to msscmd.exe command-line utility and ST.ImportFromShapefile stored procedure. If append_rows is false, creates a new target table. If append_rows is true, imports into an existing table (source and target schemas must be compatible). Default value is false.
Import process is transactional, so in case of failing it's fully rollbacked.
Any other transformation should be implemented importing into a new table and writing a custom SQL command:
{{
INSERT INTO <existing_table>
SELECT <custom_column_transformations>
FROM <new_imported_table>
}}