[sqlite] sqldiff bug report: wrong real rounding.

2020-01-11 Thread forceps millenium

Greetings!
 
In short: sqldiff unable to formulate correct `sql` to convert slave.db into 
host.db.
 
$ sqldiff slave.db host.db 
UPDATE balancelog SET total=1500.74122892 WHERE id=1418;
$ echo "UPDATE balancelog SET total=1500.74122892 WHERE id=1418;" | sqlite3 
slave.db
$ sqldiff slave.db host.db 
UPDATE balancelog SET total=1500.74122892 WHERE id=1418;
 
 
 
The reason is in `real`. In host.db — `real` `total` was generated by TRIGGER.
And precision is - 16 numbers after comma. But sqldiff shows only 8 numbers. 
It’s round 19 to 20 in this edge #8-#9 numbers, and `UPDATE` failed, because 
difference still exist.
 
More deep:
That is how is looking host.db in mid-night-commander via F3:
PRAGMA foreign_keys=OFF;                                                        
                                                                                
                                                                                
                                  
BEGIN TRANSACTION;                                                              
                                                                                
                                                                                
                                  
CREATE TABLE IF NOT EXISTS "balancelog" ( id integer primary key, timestamp 
int, coin text, total real );                                                   
                                                                                
                                      
INSERT INTO balancelog VALUES(1418,1578700800,'WAVES',1500.741228921395);   
                                                                                
                                                                                
                                  
COMMIT;
 
 
But slave.db:
PRAGMA foreign_keys=OFF;                                                        
                                                                                
                                                                                
                                  
BEGIN TRANSACTION;                                                              
                                                                                
                                                                                
                                  
CREATE TABLE IF NOT EXISTS "balancelog" ( id integer primary key, timestamp 
int, coin text, total real );                                                   
                                                                                
                                      
INSERT INTO balancelog VALUES(1418,1578700800,'WAVES',1500.741228919122);   
                                                                                
                                                                                
                                  
COMMIT;
 
host:  1500.741228921395
slave: 1500.741228919122
 
That is it. slave.db and host.db in attach. see.
 
System: Debian sid
ii  sqlite3        3.30.1-1     amd64        Command line interface for SQLite 3
$ sqlite3 -version
3.30.1 2019-10-10 20:19:45 
18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3dfalt1
 
 
--
forceps millenium
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqldiff sameples

2019-11-23 Thread oleg boksner
has anyone successfully used this tool to do a reconciliation
between two tables, i am looking to do simple rec between two tables on same db 
or if need be on sep db with same table name
with a key, it seems to not work very well or often gives me an error saying 
that table does not exist in both db even though when I do .tables
I can clearly see and query the tables 
any samples of such would be greatly appreciated

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


[sqlite] sqldiff does not report foreign key constraint differences

2019-10-29 Thread Anthony DeRobertis
The "Limitations" section of the sqldiff documentation mentions it 
doesn't handle triggers or views, but nothing about constraints. So I 
expected this to report something (note how in db1, t3.ref refences t1; 
in db2, it references t2):


sqlite> .open db1
sqlite> pragma foreign_keys = 1;
sqlite> create table t1 (a integer not null primary key);
sqlite> create table t2 (b integer not null primary key);
sqlite> create table t3 (c integer not null primary key, ref integer not null 
references t1);
sqlite> .open db2
sqlite> pragma foreign_keys = 1;
sqlite> create table t1 (a integer not null primary key);
sqlite> create table t2 (b integer not null primary key);
sqlite> create table t3 (c integer not null primary key, ref integer not null 
references t2);
sqlite> .quit
$ sqldiff db1 db2
$

I expected some output there.

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


[sqlite] sqldiff wish list

2018-04-19 Thread Dominique Devienne
Hi,

First, thanks for the tool. It's a useful one.

But here's a quick wish-list, after using the tool in a real use case:
1) a --version switch, to know which SQLite version is statically compiled
inside sqldiff
2) in-row difference: Within a row-pair, generate a minimal UPDATE and
omits all same-value columns.
3) ability to ignore some columns when computing the diff.
4) ability to use a UNIQUE INDEX as a 3rd alternative to rowid and PRIMARY
KEY row-pairing.

And here are my rationals for the above.

1) no symbols are exported. I don't remember when I got that tool. Would be
nice to have IMHO.

2) I have blobs in my tables, and small diffs in other columns still want
to update the large blobs. Makes for a much larger diff than necessary, and
also makes it hard to see what really needs changing.

3) 4) these two are linked. I have randomly generated surrogate keys (i.e.
Guids used as PRIMARY KEY, for compact FKs of composite NKs), and would
like to use the natural key (NK) instead, for row-pairing, and ignore the
differences in the PK.

These would be IMHO generally useful features, that could benefit many.
I might come around to implementing some eventually, but I wouldn't be
surprised
if someone beat me to it, and I'm not sure Richard would accept patches
either.

Thanks, --DD

PS: Hmmm, I realize that my child table NKs still reference the parent
table Guid PKs, so ignoring the PK in favor of the NK / UNIQUE INDEX would
work only for "top-level" tables... Bummer.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqldiff -- interpreting the data

2016-09-17 Thread Kumar Suraj
Can anyone please tell me when i use SQLdiff --summary option what does the
following row means

tablename:0 changes,0 inserts , 288 deletes, 0 unchanged..
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqldiff wrong quoting

2016-07-07 Thread Richard Hipp
On 7/6/16, Francesco Frassinelli <frap...@gmail.com> wrote:
> Hi,
> it looks like sqldiff can't handle special characters like `%`:

Thanks.  Bug fixed here: https://www.sqlite.org/src/info/8bb8d886ffa948cd

>
> $ sqlite3 %.db
> SQLite version 3.13.0 2016-05-18 10:57:30
> Enter ".help" for usage hints.
> sqlite> CREATE TABLE test (`%` REAL);
> sqlite>
>
> $ sqldiff %.db %.db
> sqldiff: SQL statement error: unrecognized token: """
> "SELECT B.rowid, 1, -- changed row
>A.""
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


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


[sqlite] sqldiff wrong quoting

2016-07-07 Thread Francesco Frassinelli
Hi,
it looks like sqldiff can't handle special characters like `%`:

$ sqlite3 %.db
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
sqlite> CREATE TABLE test (`%` REAL);
sqlite>

$ sqldiff %.db %.db
sqldiff: SQL statement error: unrecognized token: """
"SELECT B.rowid, 1, -- changed row
   A.""
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqldiff nowadays

2016-04-06 Thread MM
On 23 March 2016 at 15:53, Alek Paunov  wrote:

> Hi MM,
>
> Sorry for the late replay - I usually manage to check the list only once a
> day :-(.
>
> On 2016-03-22 16:05, MM wrote:
> ...
>
> If, by chance, you are on something Fedora based, I could give you some
>>> hints how to help our lead maintainer - Jan Stanek with the package
>>> enhancement myself.
>>>
>>
> ...
>
>
>> Indeed, I am using fedora 23. I have the following rpms installed (though
>> we are getting a bit out of scope for this list I suppose):
>>
>
> Great - Let's try to sort the issue out then!
>
> Definitely it is not out of scope - At least with the goal of offloading
> the core sqlite team in mind, we should explain how the Linux distributions
> works, so future _packaging_ issues to be addressed to appropriate bug
> trackers instead of bothering upstream directly (i.e. this list).
>
>
>> sqlite-libs-3.11.0-3.fc23.x86_64
>> sqlite-3.11.0-3.fc23.x86_64
>> sqlite-analyzer-3.11.0-3.fc23.x86_64
>> sqlite-doc-3.11.0-3.fc23.noarch
>> sqlite-devel-3.11.0-3.fc23.x86_64
>>
>> none of them has sqldiff.
>>
>>
> I am aware of that - I have tried to make a remark above that we (the
> interested sqlite/fedora users) should try to assist our package maintainer
> (Jan Stanek) with the inclusion of the tool.
>
> As first step, I prepared a test package set with added sqldiff - To test
> you could try:
>
> dnf -y copr enable decalek/sqlite.tools
> dnf -y install sqlite-tools
>
> If it works for you, I will try to enumerate the tasks need to be done, so
> the tool to be included in the main Fedora package repositories.
>
>
> Regards,
> Alek
>
After a very long delay,   I installed sqlite-tools and tested it on a db I
had. It works great.
I tested both with the --schema option and without. The SQL generated is
correct.

A litte note is a suffix of the RPM package:  sqldiff.1

>> rpm -qa | grep sqlite
sqlite-libs-3.11.0-3.fc23.x86_64
sqlite-3.11.0-3.fc23.x86_64
sqlitebrowser-3.8.0-1.fc23.x86_64
sqlite-analyzer-3.11.0-3.fc23.x86_64
sqlite-doc-3.11.0-3.fc23.noarch
sqlite-tools-3.11.0-3.0.sqldiff.1.fc23.x86_64
sqlite-devel-3.11.0-3.fc23.x86_64

Thanks,


[sqlite] sqldiff nowadays

2016-03-23 Thread Alek Paunov
Hi MM,

Sorry for the late replay - I usually manage to check the list only once 
a day :-(.

On 2016-03-22 16:05, MM wrote:
...

>> If, by chance, you are on something Fedora based, I could give you some
>> hints how to help our lead maintainer - Jan Stanek with the package
>> enhancement myself.

...

>
> Indeed, I am using fedora 23. I have the following rpms installed (though
> we are getting a bit out of scope for this list I suppose):

Great - Let's try to sort the issue out then!

Definitely it is not out of scope - At least with the goal of offloading 
the core sqlite team in mind, we should explain how the Linux 
distributions works, so future _packaging_ issues to be addressed to 
appropriate bug trackers instead of bothering upstream directly (i.e. 
this list).

>
> sqlite-libs-3.11.0-3.fc23.x86_64
> sqlite-3.11.0-3.fc23.x86_64
> sqlite-analyzer-3.11.0-3.fc23.x86_64
> sqlite-doc-3.11.0-3.fc23.noarch
> sqlite-devel-3.11.0-3.fc23.x86_64
>
> none of them has sqldiff.
>

I am aware of that - I have tried to make a remark above that we (the 
interested sqlite/fedora users) should try to assist our package 
maintainer (Jan Stanek) with the inclusion of the tool.

As first step, I prepared a test package set with added sqldiff - To 
test you could try:

dnf -y copr enable decalek/sqlite.tools
dnf -y install sqlite-tools

If it works for you, I will try to enumerate the tasks need to be done, 
so the tool to be included in the main Fedora package repositories.

Regards,
Alek



[sqlite] sqldiff nowadays

2016-03-22 Thread Alek Paunov
On 2016-03-22 13:49, Richard Hipp wrote:
> On 3/22/16, MM  wrote:
>> Hello,
>> I can see sqldiff appearing here:
>>
>> https://www.sqlite.org/sqldiff.html
>>
>> and in the downloads page as part of a linux 32bit binary package.
>> Alas I don't see any 64bit package.
>
> The 32bit binaries will run fine on 64bit machines.
>
>>
>> Given a distro-installed 64bit sqlite binary and libs, which part of the
>> sources would 1 need to download only sqldiff and build only that, in 64bit
>> as well.
>>
>
> Download the canonical source code distro and type:
>
>   ./configure; make sqldiff
>

In addition to the universal advice above, if you are not only 
interested in getting the tool working once, but also in _future_ 
sustainable support and consistency delivered for you by your OS 
distributor, please tell us which Linux distribution you are using.

Then other (more experienced) same distro users on the list eventually 
will be able to point you to the appropriate procedure and contacts, so 
the system sqlite package to be extended with sqldiff for all distro users.

If, by chance, you are on something Fedora based, I could give you some 
hints how to help our lead maintainer - Jan Stanek with the package 
enhancement myself.

Regards,
Alek



[sqlite] sqldiff nowadays

2016-03-22 Thread MM
On 22 March 2016 at 13:28, Alek Paunov  wrote:

> On 2016-03-22 13:49, Richard Hipp wrote:
>
>> On 3/22/16, MM  wrote:
>>
>>> Hello,
>>> I can see sqldiff appearing here:
>>>
>>> https://www.sqlite.org/sqldiff.html
>>>
>>> and in the downloads page as part of a linux 32bit binary package.
>>> Alas I don't see any 64bit package.
>>>
>>
>> The 32bit binaries will run fine on 64bit machines.
>>
>>
>>> Given a distro-installed 64bit sqlite binary and libs, which part of the
>>> sources would 1 need to download only sqldiff and build only that, in
>>> 64bit
>>> as well.
>>>
>>>
>> Download the canonical source code distro and type:
>>
>>   ./configure; make sqldiff
>>
>>
> In addition to the universal advice above, if you are not only interested
> in getting the tool working once, but also in _future_ sustainable support
> and consistency delivered for you by your OS distributor, please tell us
> which Linux distribution you are using.
>
> Then other (more experienced) same distro users on the list eventually
> will be able to point you to the appropriate procedure and contacts, so the
> system sqlite package to be extended with sqldiff for all distro users.
>
> If, by chance, you are on something Fedora based, I could give you some
> hints how to help our lead maintainer - Jan Stanek with the package
> enhancement myself.
>
> Regards,
> Alek
>
> Indeed, I am using fedora 23. I have the following rpms installed (though
we are getting a bit out of scope for this list I suppose):

sqlite-libs-3.11.0-3.fc23.x86_64
sqlite-3.11.0-3.fc23.x86_64
sqlite-analyzer-3.11.0-3.fc23.x86_64
sqlite-doc-3.11.0-3.fc23.noarch
sqlite-devel-3.11.0-3.fc23.x86_64

none of them has sqldiff.

thanks

MM


[sqlite] sqldiff nowadays

2016-03-22 Thread Matthias-Christian Ott
On 22/03/16 11:49, Richard Hipp wrote:
> On 3/22/16, MM  wrote:
>> Hello,
>> I can see sqldiff appearing here:
>>
>> https://www.sqlite.org/sqldiff.html
>>
>> and in the downloads page as part of a linux 32bit binary package.
>> Alas I don't see any 64bit package.
> 
> The 32bit binaries will run fine on 64bit machines.

That's not true for some GNU/Linux distributions which do not include
the necessary libraries to save disk space and make updates shorter.

That is not to say that sqldiff should have such prebuilt binaries. It's
safer in many respects to just compile and package it yourself.

- Matthias-Christian



[sqlite] sqldiff nowadays

2016-03-22 Thread MM
Hello,
I can see sqldiff appearing here:

https://www.sqlite.org/sqldiff.html

and in the downloads page as part of a linux 32bit binary package.
Alas I don't see any 64bit package.

Given a distro-installed 64bit sqlite binary and libs, which part of the
sources would 1 need to download only sqldiff and build only that, in 64bit
as well.

Rds,
MM


[sqlite] sqldiff nowadays

2016-03-22 Thread Richard Hipp
On 3/22/16, MM  wrote:
> Hello,
> I can see sqldiff appearing here:
>
> https://www.sqlite.org/sqldiff.html
>
> and in the downloads page as part of a linux 32bit binary package.
> Alas I don't see any 64bit package.

The 32bit binaries will run fine on 64bit machines.

>
> Given a distro-installed 64bit sqlite binary and libs, which part of the
> sources would 1 need to download only sqldiff and build only that, in 64bit
> as well.
>

Download the canonical source code distro and type:

 ./configure; make sqldiff
-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] sqldiff

2016-01-19 Thread Klaas V
Dear fellow SQLite-fans,

I'm still using the old version which is located at 
https://www.sqlite.org/2015/sqldiff-*-3081000.zip

There seem to be some changes supporting the features 3.10 and higher brought 
us.

Where can we find the newest binaries for OS X et al?

Kind regards |?Cordiali saluti | Vriendelijke groeten | Freundliche Gr?sse,
Klaas `Z4us` V ?- LinkedIn# 437429414


[sqlite] SQLDIFF problem

2015-12-01 Thread Richard Hipp
On 12/1/15, jungle Boogie  wrote:
> On 30 November 2015 at 06:27, Richard Hipp  wrote:
>>> Just curious. Why does SQLite allow those? Legacy (i.e.
>>> backward-compatibility)? Valid in ANSI SQL? --DD
>>
>> I don't know if it is valid ANSI SQL or not.  But SQLite has always
>> allowed it, so we have to support it now for legacy.
>
>
> How does one invoke the sqldiff tool? I see the c file in
> tool/sqldiff.c. I don't see a download for any OS at
> https://www.sqlite.org/download.html
>

Download the source three, then from unix do "./configure; make
sqldiff" or on Windows to "nmake /f makefile.msc sqldiff.exe"

-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] SQLDIFF problem

2015-12-01 Thread jungle Boogie
On 30 November 2015 at 06:27, Richard Hipp  wrote:
>> Just curious. Why does SQLite allow those? Legacy (i.e.
>> backward-compatibility)? Valid in ANSI SQL? --DD
>
> I don't know if it is valid ANSI SQL or not.  But SQLite has always
> allowed it, so we have to support it now for legacy.


How does one invoke the sqldiff tool? I see the c file in
tool/sqldiff.c. I don't see a download for any OS at
https://www.sqlite.org/download.html

Thanks!

-- 
---
inum: 883510009027723
sip: jungleboogie at sip2sip.info
xmpp: jungle-boogie at jit.si


[sqlite] sqldiff ---primarykey bug

2015-12-01 Thread Stuffer Oskar
On 11/30/2015 06:54 PM, Richard Hipp wrote:
> On 11/30/15, Stuffer Oskar  wrote:
>> Hallo,
>>
>> I'm using the sqldiff tool with the --primarykey option to generate a diff
>> between two databases
>> with the "WITHOUT ROWID" optimization.
>> sqldiff from sqlite 3.9.1 and 3.9.2 produces SQL statements with an
>> incorrect WHERE clause.
>>
>>
>> In the attachment you will find my fix to the
>> sqlite-src-3090100/tool/sqldiff.c file that solves this problem.
>>
> 
> This mailing list strips attachments.  But I wonder your suggested
> patch has not already been implemented at
> https://www.sqlite.org/src/info/e0ed4c3e376248df - can you check and
> see please.

I checked this changeset and my suggested patch was already implemented.

Best regards,
Oskar


[sqlite] sqldiff ---primarykey bug

2015-12-01 Thread Stuffer Oskar
> This mailing list strips attachments.  But I wonder your suggested
> patch has not already been implemented at
> https://www.sqlite.org/src/info/e0ed4c3e376248df - can you check and
> see please.

You are right, the patch I suggested is already implemented at
https://www.sqlite.org/src/info/e0ed4c3e376248df 


-- 
Oskar Stuffer
Servizi s.t. srl, Corso Italia 13/N, I-39100 Bolzano
capitale sociale versato 10.400,00 EUR
CCIAA 1342368 Tribunale di Milano 302137 CF: 01156500181 PI: IT09955600151




[sqlite] SQLDIFF problem

2015-11-30 Thread Tony Papadimitriou
You're probably right.

You can try this shorter schema and get the same problem.

create table xxx("" text);

However, my point was that if SQLite3 allows it, SQLDIFF should be able to 
handle it also.

Thanks.

-Original Message- 
From: Tim Streater
Sent: Monday, November 30, 2015 12:41 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] SQLDIFF problem

On 29 Nov 2015 at 18:55, tonyp at acm.org wrote:

> Here?s a report about an SQLDIFF utility problem.
> sqldiff: SQL statement error: near "IS": syntax error
>
> To reproduce, put the schema below (produced automatically by .IMPORT from 
> a
> CSV file so don?t bother with its appearance ? but it works in sqlite3)
> inside some file like xxx.sql, and then do the following (I tried on a 
> Win7
> machine):
>
> sqlite3 xxx.db < xxx.sql
> sqldiff xxx.db xxx.db
>
> SCHEMA (xxx.sql)
> 
> CREATE TABLE raw(
>  "Date" TEXT,

...

>  "Contact Phone Number" TEXT,
>  "" TEXT
> );

Well I don't imagine it's going to like:

  "" TEXT


--
Cheers  --  Tim






___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users 



[sqlite] sqldiff ---primarykey bug

2015-11-30 Thread Stuffer Oskar
Hallo,

I'm using the sqldiff tool with the --primarykey option to generate a diff 
between two databases
with the "WITHOUT ROWID" optimization.
sqldiff from sqlite 3.9.1 and 3.9.2 produces SQL statements with an incorrect 
WHERE clause.

For example:
UPDATE tt_dati SET codCommerciale='555' WHERE 
idtimetable='1-0640-20150906-1599', nodo=0, palina=592, ricorrenza=3, 
progressivo=8;

The SQL correct  statement should be:
UPDATE tt_dati SET codCommerciale='555'  WHERE 
idtimetable='1-0640-20150906-1599' AND nodo=0 AND palina=592 AND ricorrenza=3 
AND progressivo=8;

In the attachment you will find my fix to the sqlite-src-3090100/tool/sqldiff.c 
file that solves this problem.

Best regards,
Oskar 

-- 
Oskar Stuffer
Servizi s.t. srl, Corso Italia 13/N, I-39100 Bolzano
capitale sociale versato 10.400,00 EUR
CCIAA 1342368 Tribunale di Milano 302137 CF: 01156500181 PI: IT09955600151




[sqlite] SQLDIFF problem

2015-11-30 Thread Dominique Devienne
On Mon, Nov 30, 2015 at 2:50 PM, Richard Hipp  wrote:

> https://www.sqlite.org/src/info/64263ccb8f9835c6


"tables with zero-length column names"

Just curious. Why does SQLite allow those? Legacy (i.e.
backward-compatibility)? Valid in ANSI SQL? --DD


[sqlite] sqldiff ---primarykey bug

2015-11-30 Thread Richard Hipp
On 11/30/15, Stuffer Oskar  wrote:
> Hallo,
>
> I'm using the sqldiff tool with the --primarykey option to generate a diff
> between two databases
> with the "WITHOUT ROWID" optimization.
> sqldiff from sqlite 3.9.1 and 3.9.2 produces SQL statements with an
> incorrect WHERE clause.
>
>
> In the attachment you will find my fix to the
> sqlite-src-3090100/tool/sqldiff.c file that solves this problem.
>

This mailing list strips attachments.  But I wonder your suggested
patch has not already been implemented at
https://www.sqlite.org/src/info/e0ed4c3e376248df - can you check and
see please.

Better still, recompile using the latest sqldiff.c sources from
https://www.sqlite.org/src/artifact/653db1a9294e0b34

-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] SQLDIFF problem

2015-11-30 Thread Tim Streater
On 29 Nov 2015 at 18:55, tonyp at acm.org wrote: 

> Here?s a report about an SQLDIFF utility problem.
> sqldiff: SQL statement error: near "IS": syntax error
>
> To reproduce, put the schema below (produced automatically by .IMPORT from a
> CSV file so don?t bother with its appearance ? but it works in sqlite3)
> inside some file like xxx.sql, and then do the following (I tried on a Win7
> machine):
>
> sqlite3 xxx.db < xxx.sql
> sqldiff xxx.db xxx.db
>
> SCHEMA (xxx.sql)
> 
> CREATE TABLE raw(
>  "Date" TEXT,

...

>  "Contact Phone Number" TEXT,
>  "" TEXT
> );

Well I don't imagine it's going to like:

  "" TEXT


--
Cheers  --  Tim


[sqlite] SQLDIFF problem

2015-11-30 Thread Richard Hipp
On 11/30/15, Dominique Devienne  wrote:
> On Mon, Nov 30, 2015 at 2:50 PM, Richard Hipp  wrote:
>
>> https://www.sqlite.org/src/info/64263ccb8f9835c6
>
>
> "tables with zero-length column names"
>
> Just curious. Why does SQLite allow those? Legacy (i.e.
> backward-compatibility)? Valid in ANSI SQL? --DD

I don't know if it is valid ANSI SQL or not.  But SQLite has always
allowed it, so we have to support it now for legacy.
-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] SQLDIFF problem

2015-11-30 Thread Richard Hipp
https://www.sqlite.org/src/info/64263ccb8f9835c6
-- 
D. Richard Hipp
drh at sqlite.org


[sqlite] SQLDIFF problem

2015-11-29 Thread to...@acm.org
Here?s a report about an SQLDIFF utility problem.
sqldiff: SQL statement error: near "IS": syntax error

To reproduce, put the schema below (produced automatically by .IMPORT from a 
CSV file so don?t bother with its appearance ? but it works in sqlite3) inside 
some file like xxx.sql, and then do the following (I tried on a Win7 machine):

sqlite3 xxx.db < xxx.sql
sqldiff xxx.db xxx.db

SCHEMA (xxx.sql)

CREATE TABLE raw(
  "Date" TEXT,
  "Time" TEXT,
  "Time Zone" TEXT,
  "Name" TEXT,
  "Type" TEXT,
  "Status" TEXT,
  "Currency" TEXT,
  "Gross" TEXT,
  "Fee" TEXT,
  "Net" TEXT,
  "From Email Address" TEXT,
  "To Email Address" TEXT,
  "Transaction ID" TEXT unique,
  "Counterparty Status" TEXT,
  "Address Status" TEXT,
  "Item Title" TEXT,
  "Item ID" TEXT,
  "Shipping and Handling Amount" TEXT,
  "Insurance Amount" TEXT,
  "Sales Tax" TEXT,
  "Option 1 Name" TEXT,
  "Option 1 Value" TEXT,
  "Option 2 Name" TEXT,
  "Option 2 Value" TEXT,
  "Auction Site" TEXT,
  "Buyer ID" TEXT,
  "Item URL" TEXT,
  "Closing Date" TEXT,
  "Escrow Id" TEXT,
  "Invoice Id" TEXT,
  "Reference Txn ID" TEXT,
  "Invoice Number" TEXT,
  "Custom Number" TEXT,
  "Receipt ID" TEXT,
  "Balance" TEXT,
  "Address Line 1" TEXT,
  "Address Line 2/District/Neighborhood" TEXT,
  "Town/City" TEXT,
  "State/Province/Region/County/Territory/Prefecture/Republic" TEXT,
  "Zip/Postal Code" TEXT,
  "Country" TEXT,
  "Contact Phone Number" TEXT,
  "" TEXT
);