On 8/6/19 10:49 AM, Faheem Mitha wrote: > rm -f empty.db empty.csv > echo "" > empty.csv > echo "a, b" >> empty.csv > sqlite3 empty.db \ > 'DROP TABLE IF EXISTS empty;' \ > '.mode csv' \ > 'CREATE TABLE IF NOT EXISTS empty(A, B NOT NULL);' \ > '.import empty.csv empty' '.exit' > echo "error code is" $? > > This returns: > > sh sqlite_err.sh > > empty.csv:1: expected 2 columns but found 1 - filling the rest with NULL > empty.csv:1: INSERT failed: NOT NULL constraint failed: empty.B > error code is 0 > Which version of the SQLite shell are you running? (Run "sqlite3 -version" to see.) I'm guessing it's a pretty old one.
_______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users