Re: [sqlite] why one row's results isn't the same between program and command shell

2012-03-21 Thread Don V Nielsen
Doh!

Know the feeling.  Well!

On Wed, Mar 21, 2012 at 2:38 PM, Simon Slavin  wrote:

>
> On 21 Mar 2012, at 7:35pm, Adam DeVita  wrote:
>
> > Sorry for false alarm.  Please disregard this thread:
> >
> > Solution: make sure you quit everything and isolate the code.  There is a
> > subsequent write to the new record that made it appear as a problem, when
> > it wasn't.
>
> We've all done it.  Glad you sorted it out.
>
> 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] why one row's results isn't the same between program and command shell

2012-03-21 Thread Simon Slavin

On 21 Mar 2012, at 7:35pm, Adam DeVita  wrote:

> Sorry for false alarm.  Please disregard this thread:
> 
> Solution: make sure you quit everything and isolate the code.  There is a
> subsequent write to the new record that made it appear as a problem, when
> it wasn't.

We've all done it.  Glad you sorted it out.

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


Re: [sqlite] why one row's results isn't the same between program and command shell

2012-03-21 Thread Adam DeVita
Sorry for false alarm.  Please disregard this thread:

Solution: make sure you quit everything and isolate the code.  There is a
subsequent write to the new record that made it appear as a problem, when
it wasn't.

Adam

On Wed, Mar 21, 2012 at 3:25 PM, Adam DeVita  wrote:

> Good day,
>
> I'm just exporting data to another db of known same structure, and setting
> a flag. It seems that one row shows an incorrect result, but only so in my
> c++ code.
>
> I extracted the queries being run using my debugger, and tried them in the
> command prompt.
>
> When I run the following batch of queries.
>
>
> Table is
> CREATE TABLE WorkStations (WSIDtxt text primary key, LocationID integer,
> record_updatetime text, write_out_ok int default 0);
>
> Command Prompt results:
> Tests prepared with:
> update workstations set write_out_ok=0;
>
> sqlite> select * from workstations;
> WSIDtxt|LocationID|record_updatetime|write_out_ok
> DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|0
> PROGRAMMER-LAB00-1E-90-31-8D-19|3||0
> PROGRAMMER-LAB00-03-0D-00-00-01|3||0
> ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0
>
>
>  attach
> 'Z:\PINTS\modules\deltafiles\deltas\2012.03.21_ADAM-PC00-25-64-8C-5A-3B_r006.db'
> as 'foo' ;
>
>  insert into foo.WorkStations select distinct * from main.WorkStations M
> where M.write_out_ok =0 and M.wsidtxt is not null;
>
>  update WorkStations  set write_out_ok =1  where wsidtxt in (select
> wsidtxt from foo.WorkStations ) ;
>
>
> sqlite> select * from foo.workstations;
> ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0
> DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|0
> PROGRAMMER-LAB00-03-0D-00-00-01|3||0
> PROGRAMMER-LAB00-1E-90-31-8D-19|3||0
> sqlite> select * from workstations;
> DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|1
> PROGRAMMER-LAB00-1E-90-31-8D-19|3||1
> PROGRAMMER-LAB00-03-0D-00-00-01|3||1
> ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|1
>
>
> After executing a program that should have identical results, as identical
> queries are run:
> foo.workstations is identical.
>
> sqlite> select * from workstations;
> WSIDtxt|LocationID|record_updatetime|write_out_ok
> DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|1
> PROGRAMMER-LAB00-1E-90-31-8D-19|3||1
> PROGRAMMER-LAB00-03-0D-00-00-01|3||1
> ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0
>
> (Windows 7 32 bit edition PC. Tried with new copy of amalgamation 3.7.11
> as well as 3.7.4)
>
> Why is the last entry wrong?  Any suggestions as to how to review?
>
>
> regards,
> Adam DeVita
> VerifEye Technologies Inc.
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] why one row's results isn't the same between program and command shell

2012-03-21 Thread Adam DeVita
Good day,

I'm just exporting data to another db of known same structure, and setting
a flag. It seems that one row shows an incorrect result, but only so in my
c++ code.

I extracted the queries being run using my debugger, and tried them in the
command prompt.

When I run the following batch of queries.


Table is
CREATE TABLE WorkStations (WSIDtxt text primary key, LocationID integer,
record_updatetime text, write_out_ok int default 0);

Command Prompt results:
Tests prepared with:
update workstations set write_out_ok=0;

sqlite> select * from workstations;
WSIDtxt|LocationID|record_updatetime|write_out_ok
DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|0
PROGRAMMER-LAB00-1E-90-31-8D-19|3||0
PROGRAMMER-LAB00-03-0D-00-00-01|3||0
ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0


 attach
'Z:\PINTS\modules\deltafiles\deltas\2012.03.21_ADAM-PC00-25-64-8C-5A-3B_r006.db'
as 'foo' ;

 insert into foo.WorkStations select distinct * from main.WorkStations M
where M.write_out_ok =0 and M.wsidtxt is not null;

 update WorkStations  set write_out_ok =1  where wsidtxt in (select wsidtxt
from foo.WorkStations ) ;


sqlite> select * from foo.workstations;
ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0
DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|0
PROGRAMMER-LAB00-03-0D-00-00-01|3||0
PROGRAMMER-LAB00-1E-90-31-8D-19|3||0
sqlite> select * from workstations;
DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|1
PROGRAMMER-LAB00-1E-90-31-8D-19|3||1
PROGRAMMER-LAB00-03-0D-00-00-01|3||1
ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|1


After executing a program that should have identical results, as identical
queries are run:
foo.workstations is identical.

sqlite> select * from workstations;
WSIDtxt|LocationID|record_updatetime|write_out_ok
DT00-13-D3-50-AF-F9|2|2009.02.03.13.41|1
PROGRAMMER-LAB00-1E-90-31-8D-19|3||1
PROGRAMMER-LAB00-03-0D-00-00-01|3||1
ADAM-PC00-25-64-8C-5A-3B|3|2012.03.21.18.57.19|0

(Windows 7 32 bit edition PC. Tried with new copy of amalgamation 3.7.11 as
well as 3.7.4)

Why is the last entry wrong?  Any suggestions as to how to review?


regards,
Adam DeVita
VerifEye Technologies Inc.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users