Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sun, 12 Sep 2010, Simon Slavin wrote:

> That's one danger, depending on how you have set up your delimiters.  I
> think your earlier post about commas is more likely to solve your problem.

Simon,

   Yup. It did.

Thanks,

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


Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Simon Slavin

On 12 Sep 2010, at 4:01pm, Rich Shepard wrote:

> On Sun, 12 Sep 2010, Simon Slavin wrote:
> 
>> Any commas in it ?  Any single or double quotes ?
> 
> Probable. I need to look.
> 
>   There are apostrophe's in a long text column that I thought might be
> interpreted as single quotation marks.

That's one danger, depending on how you have set up your delimiters.  I think 
your earlier post about commas is more likely to solve your problem.

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


Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sun, 12 Sep 2010, Simon Slavin wrote:

> Any commas in it ?  Any single or double quotes ?

Simon,

   Probable. I need to look.

   There are apostrophe's in a long text column that I thought might be
interpreted as single quotation marks.

Thanks,

Rich

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


Re: [sqlite] Issues .import(ing) a .csv file

2010-09-12 Thread Rich Shepard
On Sat, 11 Sep 2010, Melton Low wrote:

> When you saved the spreadsheet as a csv file, you probably took the
> default delimiter which happens to be a comma.  You should check for a
> cell with data that has a comma in it. The embedded comma would be treated
> as a column separator which would result in the extra column.

Mel,

   Oh, Duh! That's probably it. I had similar issues months ago and thought
that I had saved the e-mail message with the solution, but grep'ing my mail
directory didn't find it.

   What I did then, and will do again now, is replace the field separators
with '|'. Emacs is very good with this.

Thanks very much,

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


Re: [sqlite] Issues .import(ing) a .csv file

2010-09-11 Thread Simon Slavin

On 12 Sep 2010, at 1:02am, Rich Shepard wrote:

>   I cannot see what's wrong with a line in a .csv file. SQLite tells me it
> expected 14 columns of data, but found 15. No matter how many times I count
> the columns (exported in .csv from an OpenOffice.org Calc spreadsheet with
> 14 columns), that's all I find.

Any commas in it ?  Any single or double quotes ?

Try importing it into a table with 15 columns and see where what it does.

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


Re: [sqlite] Issues .import(ing) a .csv file

2010-09-11 Thread Melton Low
On Sat, Sep 11, 2010 at 6:02 PM, Rich Shepard wrote:

>   I cannot see what's wrong with a line in a .csv file. SQLite tells me it
> expected 14 columns of data, but found 15. No matter how many times I count
> the columns (exported in .csv from an OpenOffice.org Calc spreadsheet with
> 14 columns), that's all I find. Nothing appears wrong with the following
> line, either. And there's no extra space or char visible in emacs after the
> final field's closing ".
>
>   What should I look for that I haven't tried yet to find?
>
> Rich
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

When you saved the spreadsheet as a csv file, you probably took the default
delimiter which happens to be a comma.  You should check for a cell with
data that has a comma in it. The embedded comma would be treated as a column
separator which would result in the extra column.

If you have an embedded comma, you have a couple of choices.  You can fix
the data and remove the comma.  Alternatively, you can tell OpenOffice to
use a different delimiter.

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


[sqlite] Issues .import(ing) a .csv file

2010-09-11 Thread Rich Shepard
   I cannot see what's wrong with a line in a .csv file. SQLite tells me it
expected 14 columns of data, but found 15. No matter how many times I count
the columns (exported in .csv from an OpenOffice.org Calc spreadsheet with
14 columns), that's all I find. Nothing appears wrong with the following
line, either. And there's no extra space or char visible in emacs after the
final field's closing ".

   What should I look for that I haven't tried yet to find?

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