Re: [sqlite] Bug: Inconsistency wrt. indirectly defined columns

2012-11-07 Thread Ryan Johnson
On 07/11/2012 7:58 PM, Simon Davies wrote: On 7 November 2012 20:36, wrote: Quoting Simon Davies : . . . I think this is the documented behaviour: http://www.sqlite.org/datatype3.html tab1.id has integer affinity, and '42' is

Re: [sqlite] Bug: Inconsistency wrt. indirectly defined columns

2012-11-07 Thread Simon Davies
On 7 November 2012 20:36, wrote: > Quoting Simon Davies : > . . . > >> I think this is the documented behaviour: >> http://www.sqlite.org/datatype3.html >> >> tab1.id has integer affinity, and '42' is coerced to integer >> tab2.id has

Re: [sqlite] Bug: Inconsistency wrt. indirectly defined columns

2012-11-07 Thread stahlhut
Quoting Simon Davies : CREATE TABLE main ( id INTEGER PRIMARY KEY ); CREATE TABLE tab1 ( id INTEGER REFERENCES main, str VARCHAR(10) ); CREATE TABLE tab2 ( id REFERENCES main, str VARCHAR(10) ); INSERT INTO tab1 VALUES ( 42, 'foo' ); INSERT INTO tab2

Re: [sqlite] Subject: SQLite driver for Java

2012-11-07 Thread danap
Well its been a while since I did a search on it, but a few years ago the best current one I could come up with is the xerial.org SQLiteJDBC. My project, MyJSQLView, uses this to provide a GUI to a SQLite database File. Dana M. Proctor MyJSQLView Project Manager > Howdy! > > What driver are

Re: [sqlite] Bug: Inconsistency wrt. indirectly defined columns

2012-11-07 Thread Simon Davies
On 7 November 2012 16:41, wrote: > Hi! > > I have encountered inconsistent behavior regarding indirectly defined > columns. > > In the following example: > > CREATE TABLE main ( id INTEGER PRIMARY KEY ); > CREATE TABLE tab1 ( id INTEGER REFERENCES main, str

[sqlite] Bug: Inconsistency wrt. indirectly defined columns

2012-11-07 Thread stahlhut
Hi! I have encountered inconsistent behavior regarding indirectly defined columns. In the following example: CREATE TABLE main ( id INTEGER PRIMARY KEY ); CREATE TABLE tab1 ( id INTEGER REFERENCES main, str VARCHAR(10) ); CREATE TABLE tab2 ( id REFERENCES main, str VARCHAR(10) );

Re: [sqlite] couldn't use is null function

2012-11-07 Thread Igor Tandetnik
YAN HONG YE wrote: > SELECT * FROM ADL WHERE Project_grading is null; > can't select anything. So there's no row in ADL where Project_grading is in fact NULL. What makes you believe differently? -- Igor Tandetnik ___

Re: [sqlite] FW: about date question

2012-11-07 Thread Simon Davies
On 7 November 2012 09:42, YAN HONG YE wrote: > the table had a column: SupplierDate Date > I wanna add 84 days : > SELECT SupplierDate+84 as date1 FROM ADL; > BUT result have noting > when use: > select date(supplierdate+'2 day') from t93c_adl limit 3; > the result is: >

Re: [sqlite] Shell import field separators

2012-11-07 Thread Colin Hardwick
Simon, > > On 6 Nov 2012, at 11:40am, Colin Hardwick > wrote: > >> Line 1 of the import file is fine, but line 2 is rejected as only having 7 >> fields instead of 8. I've experimented with ".separator" commands to no >> avail (e.g. ".separator='\t'). It

[sqlite] FW: about date question

2012-11-07 Thread YAN HONG YE
the table had a column: SupplierDate Date I wanna add 84 days : SELECT SupplierDate+84 as date1 FROM ADL; BUT result have noting when use: select date(supplierdate+'2 day') from t93c_adl limit 3; the result is: -4713-12-08 -4713-11-29 -4713-12-01 ___

[sqlite] about date question

2012-11-07 Thread YAN HONG YE
the table had a column: SupplierDate Date I wanna add 84 days : SELECT SupplierDate+84 as date1 FROM ADL; BUT result have noting ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] couldn't use is null function

2012-11-07 Thread Simon Davies
On 7 November 2012 08:27, YAN HONG YE wrote: > SELECT * FROM ADL WHERE Project_grading is null; > can't select anything. sqlite> create table ADL( id integer primary key, data text, Project_grading integer ); sqlite> insert into ADL( data, Project_grading ) values( '1', 1 );

[sqlite] couldn't use is null function

2012-11-07 Thread YAN HONG YE
SELECT * FROM ADL WHERE Project_grading is null; can't select anything. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users