Importing CSV adding default values

Hello,

I have designed a table so that fields match a third party generated .csv and importing this all works fine. I’ve also managed to add an extra field (which isn’t in the .csv) as a primary key which auto generates an integer which is great. What I am having trouble with is that I would now like to add a boolean field (a required field with default value of No). After adding this field the data fails to import as the .csv does not have data that corresponds to this boolean field and Base tells me I cannot enter a null value (as I’ve set it to be required). Interestingly if I add data manually into the table then the boolean field will auto fill with the default value.

Is there a way to make this work??

Thanks

Your question doesn’t mention a few things such as: split or embedded DB; one-time or on-going process; how much data?

You can set the boolean field to not required, import the data, set the boolean field with an SQL statement for all records and then turn the field back to required.

or

You can import the data to Calc, create a new column for the boolean field, enter the default and then copy the data to the table.

Either way is fairly quick.