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 the input file to be CSV
compliant.

Regards.

Brian P Curley



On Sun, Jan 26, 2020, 1:37 PM Scott Robison <sc...@casaderobison.com> wrote:

> 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
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to