[sqlite] compile sqlite with Visual Studio 6

2010-07-07 Thread Andrea Galeazzi
How can I compile sqlite with Visual Studio 6 with an equivalent option of /fp:precise? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] sqlite3IsNaN with msvc6

2010-06-29 Thread Andrea Galeazzi
MSVC6 doesn't have /fp: option so this piece of code in main.c always yields an assert: if ( rc==SQLITE_OK ){ u64 x = (((u64)1)<<63)-1; double y; assert(sizeof(x)==8); assert(sizeof(x)==sizeof(y)); memcpy(, , 8); assert( sqlite3IsNaN(y) ); } How can I compile sqlite in

[sqlite] check constraint error message

2010-06-01 Thread Andrea Galeazzi
Is it possible to have a custom check constraint error message? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] join performance query

2010-05-11 Thread Andrea Galeazzi
g = MYPLAYLISTSONGS.id_song > > > ) as SONGIDLIST > > on SONG.id_song = SONGIDLIST.id_song > > > Regards > Tim Romano > > > > > > > On Tue, May 11, 2010 at 6:07 AM, Andrea Galeazzi <galea...@korg.it> wrote: > >> Hi guys, &

[sqlite] join performance query

2010-05-11 Thread Andrea Galeazzi
Hi guys, I'm in a bind for a huge time consuming query! I made the following database schema: CREATE TABLE Song ( idINTEGER NOT NULL UNIQUE, titleVARCHAR(40) NOT NULL DEFAULT '' COLLATE NOCASE, artistVARCHAR(40) NOT NULL DEFAULT ''

[sqlite] find same type

2010-05-11 Thread Andrea Galeazzi
I've got this table TABLE T ( idINTEGER NOT NULL UNIQUE, file_typeVARCHAR(10) NOT NULL) My goal is to check if a certain selection has all the same values. I thought that the following statement should be enough for my aim: SELECT (SELECT file_type FROM T

Re: [sqlite] Expression tree is too large

2010-05-05 Thread Andrea Galeazzi
Thanks, it works! Frank Baumgart ha scritto: >> - Ursprüngliche Nachricht - >> Von: Andrea Galeazzi >> Gesendet: 05.05.10 12:14 Uhr >> An: General Discussion of SQLite Database >> Betreff: [sqlite] Expression tree is too large >> >> > Hi g

[sqlite] Expression tree is too large

2010-05-05 Thread Andrea Galeazzi
Hi guys, I've got a DELETE statement with a lot of OR: DELETE FROM myTable WHERE id = ? OR id = ?..OR id=? and SQLite throws this error: Expression tree is too large. Do you know a way to avoid such problem or I just have to split the large statement into shorter ones? Cheers

[sqlite] changing check constraints

2010-04-29 Thread Andrea Galeazzi
Is it possible to change check constraints? Regards ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] if exist

2010-03-09 Thread Andrea Galeazzi
It works fine! Thanks! Martin.Engelschalk ha scritto: > Hi, > > try this: > > select coalesce(min(length), 0) from t where id = ? > > Martin > > Andrea Galeazzi schrieb: > >> Hi All, >> I've got a table T made up of only two fields: INT id (

[sqlite] if exist

2010-03-09 Thread Andrea Galeazzi
Hi All, I've got a table T made up of only two fields: INT id (PRIMARY KEY) and INT length. I need a statement in order to yield 0 when the key doesn't exist. At this moment the query is too simple: SELECT length FROM T WHERE id = ? Any idea about it? Cheers

Re: [sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Andrea Galeazzi
Simon Slavin ha scritto: > On 22 Dec 2009, at 10:25am, Andrea Galeazzi wrote: > > >> ID INTEGER, >> Name TEXT >> >> So, for instance, I can have: >> >> 1 Julia >> 2 Eric >> 3 Kevin >> 4 Sarah >> 5 John >> >>

[sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Andrea Galeazzi
Hi, I'm trying to solve this problem: I've got the following table, made up of two fields: ID INTEGER, Name TEXT So, for instance, I can have: 1 Julia 2 Eric 3 Kevin 4 Sarah 5 John Now I wanna move Eric from 2 to 4 in order to yield (by performing a series of UPDATE of ID field): 1 Julia

[sqlite] any keyword

2009-11-11 Thread Andrea Galeazzi
Probably sqlite doesn't support 'any' keyword as I write it in the following query: SELECT G.id,name FROM Genre G WHERE G.id = ANY (SELECT S.genre_id FROM Song S) ORDER BY name ASC; In this case I can write an equivalent query like: select G.id,name from Genre G WHERE (SELECT COUNT(*) FROM Song

Re: [sqlite] SQLITE_CORRUPT error

2009-06-24 Thread Andrea Galeazzi
So I'm gonna find this fix in the 3.6.16 version right? I'd like to avoid to download it directly from cvs... D. Richard Hipp ha scritto: > On Jun 23, 2009, at 3:16 AM, Andrea Galeazzi wrote: > > >> Any news about this problem? >> > > http://www.sqlite.

Re: [sqlite] SQLITE_CORRUPT error

2009-06-23 Thread Andrea Galeazzi
Any news about this problem? galea...@korg.it ha scritto: In order to be more confidence about what I'm saying, I downloaded the precompiled sqlite console 3.6.15 (windows version), I executed the statement above and I've got the following error: sqlite3.exe malformed_db.db SQLite version

[sqlite] select performance with join

2009-05-07 Thread Andrea Galeazzi
Hi guys, I've got a big problem about select performance on an left join. I have two tables: CREATE TABLE Song ( id INTEGER NOT NULL UNIQUE, title VARCHAR(40) NULL COLLATE NOCASE, artist VARCHAR(40) NULL COLLATE NOCASE, bpm INT NULL, genre_id INT NULL, PRIMARY KEY (id), CONSTRAINT

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
ORDER BY title,id; ? Furthermore can the index improve select performance in both previous cases? Igor Tandetnik ha scritto: > "Andrea Galeazzi" <galea...@korg.it> wrote in > message news:49bf6196.5070...@korg.it > >> Is the order of WHERE clauses important as C-language

Re: [sqlite] Index optimization

2009-03-17 Thread Andrea Galeazzi
y, can the index improve select performance in both previous cases? Igor Tandetnik ha scritto: > "Andrea Galeazzi" <galea...@korg.it> wrote in > message news:49be74fd.6060...@korg.it > >> I red this article on wiki: >> http://www.sqlite.org/cvstrac/wiki?p

Re: [sqlite] Index optimization

2009-03-16 Thread Andrea Galeazzi
Andrea Galeazzi ha scritto: > I red this article on wiki: > http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor > I've got a similar case but the difference is that I've to use LIKE > operator instead of = > SELECT title FROM tracks > WHERE title LIKE %Mad% AND (

[sqlite] Index optimization

2009-03-16 Thread Andrea Galeazzi
I red this article on wiki: http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor I've got a similar case but the difference is that I've to use LIKE operator instead of = SELECT title FROM tracks WHERE title LIKE %Mad% AND ((title=:last_title AND id>:last_id) OR ((title>:last_title))

[sqlite] nullable select fields

2009-03-10 Thread Andrea Galeazzi
Hi All, I'm developing an application which relies on sqllite as back-end. Now I face to this problem: I've got a form that allows the user to fill a lot of fields, obliviously only a little part of them will actually be filled, the others isn't gonna be in the search criteria. So I prepare a