I have 2 data transfer sql statements being run and sent to the same table.
SqlBuldCopy1 returns column NAME||AGE||CAT
SqlBuldCopy2 returns column NAME||AGE
Is it possible to set up a default value of “ALL” to column CAT in SqlBulkCopy2?
DataReader dr = command.ExcecuteReader();
SqlBulkCopy myCopy = new SqlBulkCopy(SQLconnection);
myCopy.DestinationTableName = "Customer";
myCopy.BulkCopyTimeout = 0;
myCopy.BatchSize = 5000;
myCopy.WriteToServer(dr);
In the code you are specifying to be executed in your command.ExecuteReader, you can modify the query such that “ALL” is defined as the CAT column.
Sort of: