Import Flat File does not allow import of bit when values are 0 or 1 in SSMS 17.3
When I import a file that uses 1 or 0 as true and false the import fails because it cannot convert 1 or 0 to a BIT. Here is the error that is returned. To make this work I changed the columns to TINYINT. After the table is populated I altered the columns to be BIT and it completed successfully.
TITLE: Microsoft SQL Server Management Studio
Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)
Error inserting data into table. (Microsoft.SqlServer.Prose.Import)
The given value of type String from the data source cannot be converted to type bit of the specified target column. (System.Data)
Failed to convert parameter value from a String to a Boolean. (System.Data)
String was not recognized as a valid Boolean. (mscorlib)
As of November 7th, 2018 (v. 17.9), This issue still exists.
I exported a table to a CSV, dropped the table, and then tried to recreate it from the CSV and it will not convert 0s or 1s to bits. (Cannot create a boolean from a string).
We are looking into this one.