On Sun, Jan 26, 2020 at 11:01 AM chiahui chen <chiahuich...@gmail.com> 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 system issued " error: table has 7 columns but 8 values were supplied. > ' I wonder why. > > After experimenting different ways to import data to a table that has a > generated column, so far I only found that .read command with a .sql file > that was output as a result of 'mode insert' is successful. Is there any > other ways to import data to an existing generated-column table? > I would be inclined to import the csv as a temp table, then write an INSERT INTO ... SELECT ... query to move the appropriate columns from the temp table into the new table. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users