I know there are similar questions but I still haven’t found the answer to this problem. My setup is the following. Source table: Destination table: SqlBulkCopy call: Working scenario: If my reader executes the query SELECT * FROM BulkTable the sqlBulkCopy works fine. Non-working scenario: this logic must be generic and sometimes I am using a select query that joins
Tag: sqlbulkcopy
Any suggestion for optimizing BCP export from SQL Server using Python Subprocess
I’m studying BCP for export large amount of data (one time for initial and plan to do it in day-to-day job). Source data are in SQL Server tables, which consist of some small tables to larger ones (…
C# BulkCopy.WriteToServer Changing Values
I have a datatable that is created from and excel sheet. I am trying to SqlBulkCopy.WriteToServer. When I do so it converts my “Percent” value to 0 when my tables schema has type Decimal(38,0) for the “Percent” column. However, it inserts correctly when I have the Data Type as Float. I am not sure what is going on. I would
SqlBulkCopy ColumnMapping Error
My goal is to copy generic tables from one database to another. I would like to have it copy the data as is and it would be fine to either delete whatever is in the table or to add to it with new …