[sqlite] Too many warnings

2008-12-08 Thread Ti Ny
I compile SQLite3 using Visual Studio 2008 SP1 and I have too many warnings (103) 1>.\sqlite3.c(50675) : warning C4244: '=' : conversion from 'i64' to 'int', possible loss of data ... 1>.\sqlite3.c(78136) : warning C4244: '=' : conversion from 'u16' to 'unsigned char', possible loss of data

Re: [sqlite] Too many warnings

2008-12-08 Thread barabbas
Hi all, I prefer disabling particular warnings by project setting of Visual Studio, i.e. the compiler argument /wd (http://msdn.microsoft.com/en-us/library/thxezb7y.aspx), instead of modifying the source code of SQLite by adding #pragma, which means you don't have to ask SQLite to change,

Re: [sqlite] newie question

2008-12-08 Thread Martin Engelschalk
Hi, this is a normal select statement, you can retrieve the result in the same way as for 'select foo from bar' - Statement. The tecnical way depends on the interface you use. If you need a name of the result field, you can use 'SELECT COUNT(*) as MyField FROM atable'; the result field is the

Re: [sqlite] Too many warnings

2008-12-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ti Ny wrote: > I compile SQLite3 using Visual Studio 2008 SP1 and I have too many warnings > (103) http://www.sqlite.org/cvstrac/tktview?tn=3526 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla

[sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Hariyanto Handoko
I still sqlite 2.8.17. Can someone help me to convert this sql? tx select f.type, f.variety, f.price from fruits f where rowid in (select rowid from fruits where type = f.type order by price desc limit 1) order by f.type asc, f.price desc; ___

Re: [sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Martin Engelschalk
Hi, I don't know what your problem is, exactly. However, I suspect that you have to alias the second "fruits" as well: select f.type, f.variety, f.price from fruits f where f.rowid in (select f1.rowid from fruits f1 where f1.type = f.type order by f2.price desc limit 1) order by f.type asc,

Re: [sqlite] newie question

2008-12-08 Thread MikeW
Oscar Alejandro Alvarado Prieto <[EMAIL PROTECTED]> writes: > > how can I retrieve the result of a "SELECT COUNT(*) FROM atable" statemen? > thanks > Please use a better Subject line !! ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] newie question

2008-12-08 Thread P Kishor
On 12/8/08, Oscar Alejandro Alvarado Prieto <[EMAIL PROTECTED]> wrote: > how can I retrieve the result of a "SELECT COUNT(*) FROM atable" statemen? > thanks > > Hi Oscar, As MikeW mentioned, please use a subject line more descriptive than "newie question." Additionally, please pose a better

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Tito Ciuro
Hello Igor, On 7 Dec 2008, at 10:49 PM, Igor Tandetnik wrote: > "Tito Ciuro" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> 1 • Create the object using sqlite3_prepare_v2() or a related >> function. 2 • Bind values to host parameters using the >> sqlite3_bind_*() interfaces. >>

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Tito Ciuro
Hi Igor, On 7 Dec 2008, at 10:49 PM, Igor Tandetnik wrote: > You might want to if most of your parameters are NULL, and you just > bind > a some of them. I didn't read your reply carefully enough. It makes sense, thank you. -- Tito ___ sqlite-users

[sqlite] number of term occurances in fts3

2008-12-08 Thread Jos van den Oever
Hi all, Can one retrieve the number of times a certain term occurs in an fts table? This can be useful for autocompletion comboboxes. An example query could look like this: select term, count(term) c from myfts3table where myfts3table match 'h*'; term|c hi|10 hello|20 The snippet function is

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Igor Tandetnik
Tito Ciuro <[EMAIL PROTECTED]> wrote: >>> If step 5 is incorrect, when should I be calling >>> sqlite3_clear_bindings ()? >> >> You don't have to, if you don't want to. > > I'm curious as to why it's not needed. Is it because the latter bind > overrides the former one? Yes. > I'd like to know

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Tito Ciuro
Hi Igor, On 8 Dec 2008, at 11:29 AM, Igor Tandetnik wrote: >> I'd like to know why sqlite3_clear_bindings >> () exists in the first place. > > I don't know. It doesn't look particularly useful to me, either. Looking through the docs, it seems that sqlite3_clear_bindings() is a convenience

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Igor Tandetnik
Tito Ciuro <[EMAIL PROTECTED]> wrote: > On 8 Dec 2008, at 11:29 AM, Igor Tandetnik wrote: > >>> I'd like to know why sqlite3_clear_bindings >>> () exists in the first place. >> >> I don't know. It doesn't look particularly useful to me, either. > > Looking through the docs, it seems that

Re: [sqlite] Question about sqlite3_clear_bindings

2008-12-08 Thread Tito Ciuro
On 8 Dec 2008, at 11:54 AM, Igor Tandetnik wrote: > Tito Ciuro <[EMAIL PROTECTED]> wrote: >> On 8 Dec 2008, at 11:29 AM, Igor Tandetnik wrote: >> I'd like to know why sqlite3_clear_bindings () exists in the first place. >>> >>> I don't know. It doesn't look particularly useful to me,

Re: [sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Ribeiro, Glauber
This should return only one record, right? So you shouldn't need the second order by ("order by f.type asc, f.price desc"). -Original Message- From: Martin Engelschalk [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2008 8:15 AM To: General Discussion of SQLite Database Subject:

Re: [sqlite] newie question

2008-12-08 Thread Oscar Alejandro Alvarado Prieto
Thanks for all your answers and suggestions and sorry for my message, this was my very first one.As Martin already answer me don't worry any more. Thanks again, next time I will do better. 2008/12/8 P Kishor <[EMAIL PROTECTED]> > On 12/8/08, Oscar Alejandro Alvarado Prieto <[EMAIL PROTECTED]> >

Re: [sqlite] newie question

2008-12-08 Thread Roger Binns
Oscar Alejandro Alvarado Prieto wrote: > Thanks for all your answers and suggestions and sorry for my message, this > was my very first one.As Martin already answer me don't worry any more. > Thanks again, next time I will do better. This document has many good suggestions on how to ask

Re: [sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Martin Engelschalk
Hi, i thought that too, at first, but i think he wants to select one record for every type of fruit, namely the record with the highest price within one value of 'type' (I have difficulty saying what I mean in english.) However, the longer i look at the statement, the less sense it makes to

[sqlite] Adobe AIR SQLite - error 3132

2008-12-08 Thread Ben Marchbanks
I am getting an exception # 3132 as I try to update a record in my AIR runtime application. This error only occurs on my WinXP test machine and not on my iMac running OS 10.5.5 ( my development machine). Any resource for getting full list of error codes ? -- *Ben Marchbanks*

Re: [sqlite] Adobe AIR SQLite - error 3132

2008-12-08 Thread Ben Marchbanks
I believe I found the problem. I attempted to update a date field 2008.12.07 which was being interpretted as a number - apparently AIR version of SQLite enforces data types more stringently. *Ben Marchbanks* www.magazooms.com Signature Email: [EMAIL PROTECTED]

[sqlite] sqlite3 and incrblob

2008-12-08 Thread D.M.P.Davies
I'm having great difficulty using incrblob from tcl to a pre existingcre in the database blob as indicated at /www.sqlite.org/tclsqlite.html . I don't know where to get information on how to do it. My master table says I'e got such a blob definition and I've successfully inserted a record

Re: [sqlite] sqlite3 and incrblob

2008-12-08 Thread D. Richard Hipp
On Dec 8, 2008, at 4:35 PM, D.M.P.Davies wrote: > I'm having great difficulty using incrblob from tcl to a pre > existingcre > in the database blob as indicated at /www.sqlite.org/tclsqlite.html . > I don't know where to get information on how to do it. > My master table says I'e got such a

Re: [sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Hariyanto Handoko
I want to get one result from that query. It ok if run under sqlite3. But when I try with with sqlite 2.8.17, I got this error. SQL error: no such column: f.type I tried add AS (Alias) but still got that errror message. select f.type, f.variety, f.price from fruits AS f where rowid in

Re: [sqlite] Deactivation of Manifest Typing

2008-12-08 Thread John Stanton
In one of our Sqlite applications the gratuitous type changes of Sqlite were incompatible and it took only a very few patches to the Sqlite source to disable the detection and change code. Clay Dowling wrote: > Simon de Hartog wrote: > >>SQLite has a feature called Manifest typing. As with

Re: [sqlite] convert sql for sqlite 2.8.17

2008-12-08 Thread Jonas Sandman
Shouldn't it be select f.type, f.variety, f.price from fruits f where rowid in (select rowid from fruits where type = f.type order by price desc limit 1) ? No need for the 'AS' there. /Jonas On Tue, Dec 9, 2008 at 12:54 AM, Hariyanto Handoko <[EMAIL PROTECTED]> wrote: > I want to get one