On 5/8/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I am converting text data from another database into SQLite. Some text
> data has embedded apostrophes like this:
>
> This was George's big day
>
> Other data has embedded double quotes like this:
>
> The box is 3" wide
>
> I am generating INSERT INTO statements for thousands of records to be used
> in a Windows script to move the data into SQLite. I am needing to use
> different statement (with different delmiters) for each of the above
> 2 scenarios:
>
> INSERT INTO tbl VALUES("This was George's big day");
> INSERT INTO tbl VALUES('The box is 3" wide');
INSERT INTO tbl VALUES ('This was George''s big day');
INSERT INTO tbl VALUES ('The box is 3" wide');
The text delimiter in SQL is '
You escape a ' with another '
>
> Double-quotes wrap the apostrophe in #1, apostrophes wrap the double-quote
> in #2. But this means I need to parse the data content for every field in
> order to generate the INSERTs. Is there a single set of delimiters that
> would handle both scenarios without having to parse the data first?
>
> Chris
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Christopher F. Martin
> School of Medicine
> Center for Digestive Diseases & Nutrition
> CB# 7555, 4104 Bioinformatics Bldg.
> University of North Carolina at Chapel Hill
> Chapel Hill, North Carolina 27599-7555
> Phone: 919.966.9340 Fax: 919.966.7592
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users