I've got input data that uses double quotes to mean inches. So I have records
with a single double quote character in a record. In some cases, SQLite is
ignoring separators that are after the quotes.
The documentation says that the separator will be honored even inside of
quotes. ("The SQLite shell will always split fields on the separator
character, no matter what comes before or after it. Quotes or backslashes won't
escape them.). However, the SQLite shell seems to be behaving differently when
there is a single quote in the record.
I'm using "sqlite-shell-win32-x86-3071300.zip" and
"sqlite-dll-win32-x64-3071300.zip" on Windows XP.
To reproduce, create this table and import the attached data file:
CREATE TABLE CONFIGURATION
(
RECORD_ID NUMERIC NOT NULL,
TEXT TEXT,
NUMERIC_DATA NUMERIC
);
If there are an odd number of quotes in the file, the error message is "Error:
Separator_Ignored_Inside_Quotes.txt line 10: expected 3 columns of data but
found 2".
If there are an even number of quotes in the file, every other record is
imported and the data within the quotes is imported into the column including
separators. Edit the attached file to remove the last line and you'll see this
behavior.
Thanks for looking it this bug and for SQLite.
Mike Hayes
Exelis Inc., Bowie, MD.
________________________________
Email addresses of ITT Exelis employees have changed from itt.com to
exelisinc.com. Please update your favorites and contact information to reflect
these changes.
This e-mail and any files transmitted with it may be proprietary and are
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this e-mail in error please notify the sender.
Please note that any views or opinions presented in this e-mail are solely
those of the author and do not necessarily represent those of Exelis Inc. The
recipient should check this e-mail and any attachments for the presence of
viruses. Exelis Inc. accepts no liability for any damage caused by any virus
transmitted by this e-mail.
1|TEXT LINE 1 (72")|43721S
2|TEXT LINE 2 (72")|43721S
3|TEXT LINE 3 (72")|43721S
4|TEXT LINE 4 (72")|43721S
5|TEXT LINE 5 (72")|43721S
6|TEXT LINE 6 (72")|43721S
7|TEXT LINE 7 (72")|43721S
8|TEXT LINE 8 (72")|43721S
9|TEXT LINE 9 (72")|43721S
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users