For other newbies' benefit: Yes, indeed, importing empty columns doesn't set
them to NULL.
UPDATE Shops SET "contact:postcode" = NULL WHERE "contact:postcode" = "";
UPDATE Shops SET "addr:postcode" = NULL WHERE "addr:postcode" = "";
SELECT name, IFNULL("contact:postcode","addr:postcode") zipcode
Hello,
I imported data from a CSV file.
Some of the columns are empty, so I expected them to be set to NULL, but it
looks like it's not how SQLite handles them internally:
=
sqlite> .schema
CREATE TABLE Shops(
"id" TEXT,
"name" TEXT,
"contact:postcode" TEXT,
"contact:city" TEXT,
Dear Alan:
I have implemente an application that I name as ExcelToSQLite and his
counterpart SQLiteToExcel. If you want, I can sent to you.
Your
Ing. Héctor F. Fiandor Rosario
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://m
many thanks again for the replies and sorry I was amiss in not stating
that it was sqlite3 DXCC.db, I was using the .db suffix but to no avail,
however the problem has been that I was not getting it into the right
folder
to enter the import command.
Thanks Bill you hit it on the nose, whe
ific folder by holding shift and right clicking on the folder, then select
"Open command window here". This is an alternative to cd-ing to the folder from
a default starting location.
-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
ct: Re: [sqlite] sqlite importing csv
>
> By the way I have a folder C:\jt65Logger that contains all the databases etc
> to
> do with the project.
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> ht
On 2016/08/25 9:35 AM, Alan wrote:
Simon,
I entered what you asaked and no, that file is in
the users\John directory
so I guess that the cmd sqlite3 DXCC is not shifting the focus to the
directory that the DXCC database is in
and i would need to be using some other set of commands to m
By the way I have a folder C:\jt65Logger that contains all the
databases etc to do with the project.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Simon,
I entered what you asaked and no, that file is in
the users\John directory
so I guess that the cmd sqlite3 DXCC is not shifting the focus to the
directory that the DXCC database is in
and i would need to be using some other set of commands to make that happen
Alan
On 25-Aug-16
after clicking on the command it is in
C:\users\john
after typing sqlite3 DXCCit shows sqlite> if I then enter cd it
shows ...>
On 25-Aug-16 18:01, Simon Slavin wrote:
On 25 Aug 2016, at 6:59am, Alan wrote:
I right Clicked on start and selected the windows cmd, and as I unders
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On
Behalf Of Simon Slavin
Sent: Thursday, 25 August, 2016 01:02
To: SQLite mailing list
Subject: Re: [sqlite] sqlite importing csv
On 25 Aug 2016, at 6:59am, Alan wrote:
> I right Clicked on start and selected the windows cmd, and a
On 25 Aug 2016, at 6:59am, Alan wrote:
> I right Clicked on start and selected the windows cmd, and as I understand
> it at the moment
>
> by typing sqlite3 DXCC then it should be sitting in the directory or folder
> that the DXCC database is in
I don't think this is correct. Once you hav
I have created a directory for the project I am working on, and the
Database and the csv file both reside in that directory.
I right Clicked on start and selected the windows cmd, and as I
understand it at the moment
by typing sqlite3 DXCC then it should be sitting in the directory or
folde
On 25 Aug 2016, at 4:03am, Alan wrote:
> attempt to import a short test Excel table
> of two columns with about 4 records in it, the main one I was trying to
> import had the same trouble
> with, it had over 300 records in it with two columns.
Issue this command:
sqlite3 DXCC.sqlite
then in
On Aug 24, 2016 10:25 PM, "Alan" wrote:
>
> forgot to reply to one of the questions.
>
> I am using version 3.13.0.0 and it is 64 bit
>
> I am running Windows 10 Pro
>
> computer is intel I3 3.5Ghz with 8Gb RAM.
>
> As my friend has no problem loading the same csv file with his Windows7
computer
forgot to reply to one of the questions.
I am using version 3.13.0.0 and it is 64 bit
I am running Windows 10 Pro
computer is intel I3 3.5Ghz with 8Gb RAM.
As my friend has no problem loading the same csv file with his Windows7
computer
I am guessing that it may be to do with running Windo
HI Guys
really appreciate all your replies.What I am doing at present is to
attempt to import a short test Excel table
of two columns with about 4 records in it, the main one I was trying to
import had the same trouble
with, it had over 300 records in it with two columns.
the test one has heade
Alan,
if you are new to sqlite3 then let me give you a little heads up on
something that tripped me up a couple of times in early days. I am assuming
you are the command line sqlite3 interface which will require you to set
the separator for data imports.
.separator ,
...is likely what you want i
Windows requires that you escape the \ in the path, effectively doubling
them up.
Regards.
Brian P Curley
On Aug 24, 2016 8:24 PM, "Simon Slavin" wrote:
> I hope someone else can help.
>
> Does that table already exist in the database file ?
>
> Is the first line of the csv file a line of dat
I hope someone else can help.
Does that table already exist in the database file ?
Is the first line of the csv file a line of data or a line of column names ?
Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglist
Hi Simon,
firstly both the database and the csv files are in ther same folder.
I have gone into Windows cmd
typed sqlite3 DXCC(database)
.mode csv
.separator ,
.import anr.csv DXE(DXCC table)
I have also tried putting in the full path to the csv file and
unfortunately
the same result.
On 24 Aug 2016, at 11:04pm, Alan wrote:
> Firstly I am very new to sqlite, but I have a problem when trying to
>
> import a .csv file into a database, getting "cannot open (file).csv"
>
> I am using Windows10 and wondering if anyone else has had this problem.
The program is probably looking
Firstly I am very new to sqlite, but I have a problem when trying to
import a .csv file into a database, getting "cannot open (file).csv"
I am using Windows10 and wondering if anyone else has had this problem.
A friend has been able to import exactly the same csv file but he is
using windows
Question:
I wished to import a CSV file representing nulls as empty strings (nothing
between the commas). I observed that the .import command by default imports
those as empty strings.
A minimalistic example: Let's create a table T with a single column (c) and a
file containing only one new l
Hi,
I think I'm getting a bunch of attached fields. Everything is added to the
same line, without separators. I've seen it when I read it. I've used:
.mode csv table1
.import data.csv table1
.save Data.dat
Kind regards,
Miguel Fernandes
___
sqlite-us
Thanks for the report. Fixed on trunk, here:
https://www.sqlite.org/src/info/fc918f7d33
--
Joe Mistachkin
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Hello,
I've taken the time to investigate the problem: only the last
parameter is not correctly bound to NULL.
May I suggest a patch:
--- shell_.c 2014-06-15 14:22:39.0 +0200
+++ shell.c 2014-06-15 14:23:11.0 +0200
@@ -2553,7 +2553,7 @@
"filling the rest
gwenn, thanks for this. I did not understand what you saw, and then I
realized my shell exe was probably too old.
I downloaded the new exe and this solves the problem just fine!
thanks for your help.
gert
2014-06-02 19:03 GMT+02:00 gwenn :
> Hello,
> I doesn't fail for me (it may depend on the
Hello,
I doesn't fail for me (it may depend on the constraints on the target
table) but the behaviour is unexpected:
$ echo "1|test
> " > empty.csv
$ sqlite3
SQLite version 3.8.4.3 2014-04-03 16:53:12
sqlite> create table test(opt text, data text not null);
sqlite> .import empty.csv test
empty.csv
All,
I received 100.000 UTF-8 files (average size 50kb) "ready for import" in
an SQLite db.
90% of them go fine, but some files have an empty line at the very end of
the fine (so an extra EOL before the EOF).
Of course, the import fails... Is there an easy way to get rid of that
extra empty line
vember 13, 2012 9:23 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Importing CSV File Into Table
>
> Hello
>
> TJM> I am trying to import some data from a csv file to an existing
> TJM> table called MasterChargeList. But this is failing with th
Tilsley, Jerry M. wrote:
> sqlite> .import /csv/iv_codes.csv MasterChargeList;
> Error: no such table: MasterChargeList;
The internal commands of the sqlite3 command-line tool that begin
with a period are not delimited with a semicolon, so the semicolon
that you have entered is interpreted as part
Hello
TJM> I am trying to import some data from a csv file to an existing table
TJM> called MasterChargeList. But this is failing with the error that the
TJM> table does not exist. This is on SQLite 3.6.4 (required to use this
TJM> version). See below for details:
TJM> sqlite> .import /csv/
All,
I am trying to import some data from a csv file to an existing table called
MasterChargeList. But this is failing with the error that the table does not
exist. This is on SQLite 3.6.4 (required to use this version). See below for
details:
sqlite> .mode csv
sqlite> .schema
CREATE TABLE
>
> I have got to stop working until 3:00am. Your suggestion points to what I
> did not verify. The original CSV is much richer with double quoting some
> values. The following shows that setting the separator as I was within the
> shell does not do what I was expecting:
>
>
I made one that I am
On Fri, Oct 14, 2011 at 7:37 AM, Simon Davies
wrote:
> On 14 October 2011 15:17, James Hartley wrote:
> > When attempting to import CSV data, the shell balks...
>
> and look at what the separator is set to in the .show output...
>
I have got to stop working until 3:00am. Your suggestion points
On 14 October 2011 15:17, James Hartley wrote:
> When attempting to import CSV data, the shell balks at the command-line but
> is otherwise fine when all is done interactively. I suspect user error, but
> I just don't see it. Any insight shared would be greatly appreciated.
I am using wdoze not
When attempting to import CSV data, the shell balks at the command-line but
is otherwise fine when all is done interactively. I suspect user error, but
I just don't see it. Any insight shared would be greatly appreciated.
Thanks.
$ ls
create_table.sql src.csv
$ cat create_table.sql
src.csv
Roger Binns wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 09/13/2010 04:06 PM, BareFeetWare wrote:
>> All this talk of replacing multiple commas with pipes, then replacing pipes
>> and so on, though clever and helpful is problematic, cumbersome and even
>> comical for a matur
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/13/2010 04:06 PM, BareFeetWare wrote:
> All this talk of replacing multiple commas with pipes, then replacing pipes
> and so on, though clever and helpful is problematic, cumbersome and even
> comical for a mature product like SQLite.
SQLite i
BareFeetWare wrote:
> All this talk of replacing multiple commas with pipes, then replacing pipes
> and so on, though clever and helpful is problematic, cumbersome and even
> comical for a mature product like SQLite.
>
> On 13/09/2010, at 9:53 PM, Simon Slavin wrote:
>
>> This is true. You a
All this talk of replacing multiple commas with pipes, then replacing pipes and
so on, though clever and helpful is problematic, cumbersome and even comical
for a mature product like SQLite.
On 13/09/2010, at 9:53 PM, Simon Slavin wrote:
> This is true. You are right. You might argue that it'
Rich Shepard wrote:
On Mon, 13 Sep 2010, Mithun Nair wrote:
When i try importing it into a SQLite table, i get some errors like
"expected 2 columns of data but found 1". Later i found that importing a
comma separated file into SQlite wont work because a comma is considered
as a delimiter by t
On Mon, 13 Sep 2010, Mithun Nair wrote:
> When i try importing it into a SQLite table, i get some errors like
> "expected 2 columns of data but found 1". Later i found that importing a
> comma separated file into SQlite wont work because a comma is considered
> as a delimiter by the the SQLite en
On 13 Sep 2010, at 11:53am, Mithun Nair wrote:
> Its a comma separated file.
> When i try importing it into a SQLite table, i get some errors like "expected
> 2 columns of data but found 1". Later i found that importing a comma
> separated file into SQlite wont work because a comma is considere
Hello everyone,
I had a small doubt regarding importing CSV files into SQLite. I have
this simple text file with a couple of columns and a few records. Its a comma
separated file.
When i try importing it into a SQLite table, i get some errors like "expected 2
columns of data but found 1"
Let's say I have many csv files (25, to be exact) and want to create a
sqlite database out of them? How do I do that?
Furthermore, in addition to the 25 text files of data, there are 25
corresponding sql files that define the tables, so does this mean
those would have to be rewritten in sqlite? A
anyway to import csv files in sqlite3? .import does not quite work, leaves the
quotes in.
48 matches
Mail list logo