On 2013/06/26 15:21, Igor Tandetnik wrote:

For instance, what is the resulting fields from this CSV: [123, 9" Nail,
", Caliper, "set, up 5"", hold", 8 ]
In REAL CSV terms that would be:    123  |  9 Nail,  | Caliper | set, up
5", hold  |  8

If by REAL CSV you mean the format specified in RFC 4180, then your example is not a well-formed CSV input (and the OP's example isn't either):

I do mean RFC4180, but do apologise, i did not imply that my CSV input was in any way REAL CSV, I meant if a real csv interpreter conforming to RFC4180 were to read the garbage I posted, it would come up with the result specified. The problem Reinhard is having is that he has explicitely non-standard (or non-real if you will) "CSV-like" coded input (from somewhere) and is suggesting a work-around of the SQLite .import function to allow his non-standard input to be imported. My examples were aimed at showing the problems of interpreting non-standard formatting specifically as well as the compatibility failure (with actual CSV input) - and specifically to the way(s) he suggested it to be imported.

Having done this many times I already know the answer to his problem, it's real easy, a simple command-line tool to make his weird format into a SQLite table - would take a few minutes to make and save him a lot of trouble - I even offered help doing it - but he is intent on arguing that SQLite should change and do it "smarter" - (which is his right) - and now I'm trying to show why it isn't smarter in the hope of finding a resolve.


If, on the other hand, by REAL CSV you mean something other than RFC 4180, then it would appear that the rules are not in fact set in stone, and are in fact subject to interpretation and disagreement.

Which isn't what I meant, but even if it were, SQLite would have to conform to "some" standard officially (else how would anyone be able to trust the importing?). There is no way to marry the supported format (whether RFC1480 or another CSV standard) to his proposed import plan so far.


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to