Re: [sqlite] Strange comparison with CAST behavior

2013-12-05 Thread Luís Simão
r123 3 000 NULL > 5 Eq 3 1 271 NULL <== text > affinity, store result > 6 ResultRow 1 1 000 NULL > 7 Halt 0 0 000 NULL >

[sqlite] Strange comparison with CAST behavior

2013-12-05 Thread Luís Simão
I found this strange behavior in SQLite: While testing whether SQLite performs cast before comparison or just return 0, I entered following: SELECT CAST(123 AS INT)='123'; And for my surprise, it returned 1!!! However, my previous tests checked that numeric/text comparisons always returned

Re: [sqlite] query optimization

2013-11-18 Thread Luís Simão
Assuming you are using parameters you may use something like: DELETE FROM emp WHERE key=?1 AND CASE ?2 IS NULL THEN 1 ELSE name=?2; BR 2013/11/18 d b > Hi, > > > I am trying to make single query instead of below two queries. Can > somebody help? > > 1. delete from

Re: [sqlite] Intended use case for 'without rowid'?

2013-11-15 Thread Luís Simão
SQLite answers those question in: http://www.sqlite.org/draft/withoutrowid.html BR ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] .import error: cannot open large file

2013-11-15 Thread Luís Simão
Not sure if it helps, but you could try sqlite3 somedb '.import /dev/stdin hugetable' < huge.file making OS handle file reading instead of another process (cat). LS 2013/11/14 lpryszcz > Hi, Often I pipe tables (from .gz or multiple files). I found it also work >

Re: [sqlite] report bugs-update

2013-11-11 Thread Luís Simão
en the library is built from source, not from the amalgamation <http://www.sqlite.org/amalgamation.html> or from the collection of pre-packaged C files provided for non-Unix like platforms on the website." Com os melhores cumprimentos, Luís Simão 2013/11/10 BULUSLI <quanwei