On Fri, Apr 23, 2010 at 11:04:01AM -0500, P Kishor wrote: > On Fri, Apr 23, 2010 at 10:42 AM, Derek Martin <demar...@akamai.com> wrote: > > Column mode (without any truncation) is the format desired for these > > reports... Picking large enough values is bad, because it means that > > I'd need to specify very large column widths for most of the columns, > > which in many cases would needlessly make the report tediously wide, > > to accomodate some less common cases where the reports generate very > > wide columns. Avoiding this is sort of the point of databases doing > > this for you... ;-) > > > Well, no... the job of a database is to store your data,
By "this" I meant "producing columnar output..." > A perfect and most minimal database will preserve your data > integrity 100%. It will give you back whatever you put in, without any > interpretation. But sqlite3 doesn't do that... it truncates my fields to 10 chars. :) That's a rather poor interpretation of my data, as it turns out. > All the formatting that you want to do, you can and should do via > your client program. Right... sqlite3 is my client program. :) The format we want is the format already provided by virtually every SQL database's command-line front end. This *includes sqlite3*, except that at some arbitrary point which I have not determined and can't find any documentation about, sqlite3 starts truncating fields to 10 characters. I don't want to write code to duplicate this functionality, because lots of stuff already provides it, *including sqlite* -- sometimes. It's totally wasted effort for me to rewrite all that, and will slow down my program senselessly. > > It would be swell if sqlite3 had a -notruncate option or some such, > > What version of sqlite are you using? Whichever one is installed by my company on my desktop, which in this case is 3.4.2. I mention that because it's an important point... for our purposes, we need to use tools that are readily available by everyone who needs to work with this stuff. > Funnily, I have a table with lots of running text, and even though I > specify .mode column, I don't see any truncation at all. As was the case for me... until I did an outer left join on another table, adding 3 more columns, 2 of which range in size from about 30 to 50 characters. Like I said, this is an arbitrary -- and in my mind highly undesirable -- limitation which does not seem to be well documented. > Of course, the text wraps around in my terminal window and makes > everything look like nonsense, but that is another story. For this, there is (GNU) less -S. :) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users