Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Richard Hipp
On Mon, Jan 16, 2012 at 2:28 PM, Udi Karni  wrote:

>
> (2) I am new to share-ware. I don't compile my own code. How long between
> "checked in" and "included in the shell-for-windows on the download page" ?
>
>
Since SQLite 3.7.10 was released earlier this morning, you hit the worst
case, and the time to seeing a precompiled binary on the download page will
be about 2 or 3 months.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Thanks Dr. Hipp !

(1) Wow - what fast turnaround in the share-ware world  !!!

(2) I am new to share-ware. I don't compile my own code. How long between
"checked in" and "included in the shell-for-windows on the download page" ?

On Mon, Jan 16, 2012 at 8:57 AM, Richard Hipp  wrote:

> Changes to the command-line shell so that it understands quoted fields have
> now been checked in.
>
> On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:
>
> > Oliver - thanks !
> >
> > Hm so there is no way to specify (borrowing syntax from other
> DBs)
> > something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?
> >
> > On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters 
> wrote:
> >
> > > Am 16.01.2012 17:10, schrieb Udi Karni:
> > >
> > >  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the
> > last
> > >> version I downloaded and unfortunately replaced with the latest...)
> > >>
> > >
> > >
> > > afaik this never worked with the original CLI (might be that you have
> > used
> > > a fork that can do this)
> > >
> > > I see 3 solutions:
> > >
> > > if you can influence the delimiter take a reliable delimiter (a string
> > > you're not using in your file - maybe a |)  and export without " as
> > markers
> > > for text columns
> > >
> > > if cant't influence the look of the source find and don't mind to do it
> > > manually you can import into a spreadsheet program and use a reliable
> > > delimiter without using "
> > >
> > > if you like scripting you can create a little program with your
> favorite
> > > language
> > >
> > > greetings
> > > Oliver
> > >
> > >
> > >
> > >> How, then, do you import character columns that contain commas (like
> > >> addresses) from a .csv which uses commas as a delimiter?
> > >>
> > >> Thanks !
> > >>
> > >> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
> > >>  wrote:
> > >>
> > >>
> > >>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
> > >>>
> > >>>  "COL1","COL2"
> >  "",""
> >  "XX,X",""
> > 
> > >>>
> > >>> Sorry, but the shell tool doesn't understand quotes in csv files.
> > >>>
> > >>> Simon.
> > >>>
> > >> __**_
> > > sqlite-users mailing list
> > > sqlite-users@sqlite.org
> > > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
> > >
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
>  ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:57, schrieb Richard Hipp:

Changes to the command-line shell so that it understands quoted fields have
now been checked in.



thanks - what about a possibility to recognize special characters (i.e. 
\NULL) or delimiter""delimiter or delimiterdelimiter as NULL during the 
import? I'm only asking because you started to introduce this luxury 
feature ;-)


greetings from a grateful user
Oliver


On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:


Oliver - thanks !

Hm so there is no way to specify (borrowing syntax from other DBs)
something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:


Am 16.01.2012 17:10, schrieb Udi Karni:

  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the

last

version I downloaded and unfortunately replaced with the latest...)




afaik this never worked with the original CLI (might be that you have

used

a fork that can do this)

I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a string
you're not using in your file - maybe a |)  and export without " as

markers

for text columns

if cant't influence the look of the source find and don't mind to do it
manually you can import into a spreadsheet program and use a reliable
delimiter without using "

if you like scripting you can create a little program with your favorite
language

greetings
Oliver




How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
  wrote:



On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

  "COL1","COL2"

"",""
"XX,X",""



Sorry, but the shell tool doesn't understand quotes in csv files.

Simon.


__**_

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

http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>



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







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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 4:49pm, Udi Karni wrote:

> Hm so there is no way to specify (borrowing syntax from other DBs)
> something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

To import fields which contain commas use a delimiter other than a comma to 
separate your fields and preceed your .import command with a .separator 
command.  Or write your own importer and use that instead of the shell tool.

The .import command isn't SQLite.  It has nothing to do with the SQL API, it's 
just a feature built into the command-line tool.  It's very primitive and 
doesn't deal much of anything besides very simple delimited fields with one 
record per line of text.

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Richard Hipp
Changes to the command-line shell so that it understands quoted fields have
now been checked in.

On Mon, Jan 16, 2012 at 11:49 AM, Udi Karni  wrote:

> Oliver - thanks !
>
> Hm so there is no way to specify (borrowing syntax from other DBs)
> something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?
>
> On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:
>
> > Am 16.01.2012 17:10, schrieb Udi Karni:
> >
> >  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the
> last
> >> version I downloaded and unfortunately replaced with the latest...)
> >>
> >
> >
> > afaik this never worked with the original CLI (might be that you have
> used
> > a fork that can do this)
> >
> > I see 3 solutions:
> >
> > if you can influence the delimiter take a reliable delimiter (a string
> > you're not using in your file - maybe a |)  and export without " as
> markers
> > for text columns
> >
> > if cant't influence the look of the source find and don't mind to do it
> > manually you can import into a spreadsheet program and use a reliable
> > delimiter without using "
> >
> > if you like scripting you can create a little program with your favorite
> > language
> >
> > greetings
> > Oliver
> >
> >
> >
> >> How, then, do you import character columns that contain commas (like
> >> addresses) from a .csv which uses commas as a delimiter?
> >>
> >> Thanks !
> >>
> >> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
> >>  wrote:
> >>
> >>
> >>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
> >>>
> >>>  "COL1","COL2"
>  "",""
>  "XX,X",""
> 
> >>>
> >>> Sorry, but the shell tool doesn't understand quotes in csv files.
> >>>
> >>> Simon.
> >>>
> >> __**_
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users<
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users>
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:49, schrieb Udi Karni:

Oliver - thanks !
Hm so there is no way to specify (borrowing syntax from other
DBs) something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?


yes, no way :-)

if you want to discover the possibilities of the CLI type .h (after 
having started with sqlite3)


Oliver



On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters mailto:oliver@web.de>> wrote:

Am 16.01.2012 17:10, schrieb Udi Karni:

Simon - thanks - but this used to work on 3.7.7.1 (I believe was
the last
version I downloaded and unfortunately replaced with the latest...)



afaik this never worked with the original CLI (might be that you
have used a fork that can do this)

I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a
string you're not using in your file - maybe a |)  and export
without " as markers for text columns

if cant't influence the look of the source find and don't mind to do
it manually you can import into a spreadsheet program and use a
reliable delimiter without using "

if you like scripting you can create a little program with your
favorite language

greetings
Oliver



How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon
Slavinmailto:slav...@bigfraud.org>>  wrote:


On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

"COL1","COL2"
"",""
"XX,X",""


Sorry, but the shell tool doesn't understand quotes in csv
files.

Simon.

_
sqlite-users mailing list
sqlite-users@sqlite.org 
http://sqlite.org:8080/cgi-__bin/mailman/listinfo/sqlite-__users





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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Oliver - thanks !

Hm so there is no way to specify (borrowing syntax from other DBs)
something like - "DELIMITED BY ',' ENCLOSED BY ' " ' ?

On Mon, Jan 16, 2012 at 8:32 AM, Oliver Peters  wrote:

> Am 16.01.2012 17:10, schrieb Udi Karni:
>
>  Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
>> version I downloaded and unfortunately replaced with the latest...)
>>
>
>
> afaik this never worked with the original CLI (might be that you have used
> a fork that can do this)
>
> I see 3 solutions:
>
> if you can influence the delimiter take a reliable delimiter (a string
> you're not using in your file - maybe a |)  and export without " as markers
> for text columns
>
> if cant't influence the look of the source find and don't mind to do it
> manually you can import into a spreadsheet program and use a reliable
> delimiter without using "
>
> if you like scripting you can create a little program with your favorite
> language
>
> greetings
> Oliver
>
>
>
>> How, then, do you import character columns that contain commas (like
>> addresses) from a .csv which uses commas as a delimiter?
>>
>> Thanks !
>>
>> On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin
>>  wrote:
>>
>>
>>> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
>>>
>>>  "COL1","COL2"
 "",""
 "XX,X",""

>>>
>>> Sorry, but the shell tool doesn't understand quotes in csv files.
>>>
>>> Simon.
>>>
>> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Oliver Peters

Am 16.01.2012 17:10, schrieb Udi Karni:

Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
version I downloaded and unfortunately replaced with the latest...)



afaik this never worked with the original CLI (might be that you have 
used a fork that can do this)


I see 3 solutions:

if you can influence the delimiter take a reliable delimiter (a string 
you're not using in your file - maybe a |)  and export without " as 
markers for text columns


if cant't influence the look of the source find and don't mind to do it 
manually you can import into a spreadsheet program and use a reliable 
delimiter without using "


if you like scripting you can create a little program with your favorite 
language


greetings
Oliver



How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin  wrote:



On 16 Jan 2012, at 3:34pm, Udi Karni wrote:


"COL1","COL2"
"",""
"XX,X",""


Sorry, but the shell tool doesn't understand quotes in csv files.

Simon.

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


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Udi Karni
Simon - thanks - but this used to work on 3.7.7.1 (I believe was the last
version I downloaded and unfortunately replaced with the latest...)

How, then, do you import character columns that contain commas (like
addresses) from a .csv which uses commas as a delimiter?

Thanks !

On Mon, Jan 16, 2012 at 7:43 AM, Simon Slavin  wrote:

>
> On 16 Jan 2012, at 3:34pm, Udi Karni wrote:
>
> > "COL1","COL2"
> > "",""
> > "XX,X",""
>
> Sorry, but the shell tool doesn't understand quotes in csv files.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.7.9 Import problem - a test case

2012-01-16 Thread Simon Slavin

On 16 Jan 2012, at 3:34pm, Udi Karni wrote:

> "COL1","COL2"
> "",""
> "XX,X",""

Sorry, but the shell tool doesn't understand quotes in csv files.

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