On Sun, Jul 12, 2009 at 08:23:35AM -0400, Stephan Lindner scratched on the wall: > Dear all, > > Sorry ahead for a really trivial question, but I'm not very familiar > with sqlite and just can't figure it out ... > > I'm importing large survey files into sqlite, and I run into the > problem of creating a table with too many columns, i.e. > > bash$ sqlite3 < tables.sql > > produces > > bash$ SQL error near line 3: too many columns on t3
You need to re-compile SQLite with a larger limit. The limit is defined by the compile-time define SQLITE_MAX_COLUMNs. The default is 2000. You need to seriously consider your database design if you're going over this. http://sqlite.org/limits.html#max_column http://sqlite.org/compile.html > Now I figured that I have to change the limit on columns -- see > > http://www.sqlite.org/c3ref/c_limit_attached.html > > but I don't know how! I tred all kinds of variations of > > int sqlite3_limit(sqlite3*, SQLITE_LIMIT_COLUMN, 5000) That's a C programming call. And you can only use it to lower the limit, not raise it. By default the soft-limit is set to the hard-limit. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users