Re: [sqlite] importing data to a table that has generated-columns

2020-02-01 Thread James K. Lowden
On Mon, 27 Jan 2020 12:00:52 -0700 "Keith Medcalf" wrote: > If you mean importing into a pre-existing table as above that is > declared with "check typeof(a) in ('integer', 'real')" then yes. The > check constraint is run before affinity is applied rather than after > (unfortunately) ... Thank

Re: [sqlite] importing data to a table that has generated-columns

2020-01-27 Thread Keith Medcalf
On Monday, 27 January, 2020 10:31, James K. Lowden wrote: >On Sun, 26 Jan 2020 12:01:32 -0700 >"Keith Medcalf" wrote: >> Now that the table exists, use "SELECT * FROM " to determine >> the number of columns in the table (which will include computed >> always columns, if any). >... >>

Re: [sqlite] importing data to a table that has generated-columns

2020-01-27 Thread James K. Lowden
On Sun, 26 Jan 2020 12:01:32 -0700 "Keith Medcalf" wrote: > Now that the table exists, use "SELECT * FROM " to determine > the number of columns in the table (which will include computed > always columns, if any). ... > Otherwise, Richard *may* make some changes to the .import logic which >

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Brian Curley
Is there a missed parsing on the input file? It's likely to be a bare word situation where an extra delimiter is encountered in the record. It's probably only on one record in particular, although I don't know if the error message reads that back. The shell is sensitive to these, as it's expected

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Keith Medcalf
On Sunday, 26 January, 2020 10:29, chiahui chen wrote: >After creating a table (total 8 columns including 1 generated column), I >tried to import data from a csv file (each record has values for 7 >columns that match the non-generated column names and data types, no >headers ). >The system

Re: [sqlite] importing data to a table that has generated-columns

2020-01-26 Thread Scott Robison
On Sun, Jan 26, 2020 at 11:01 AM chiahui chen wrote: > Hi, > > After creating a table (total 8 columns including 1 generated column) , I > tried to import data from a csv file (each record has values for 7 columns > that match the non-generated column names and data types, no headers ). > > The

[sqlite] importing data to a table that has generated-columns

2020-01-26 Thread chiahui chen
Hi, After creating a table (total 8 columns including 1 generated column) , I tried to import data from a csv file (each record has values for 7 columns that match the non-generated column names and data types, no headers ). The system issued " error: table has 7 columns but 8 values were