Re: [sqlite] Update and GROUP BY

2013-11-06 Thread James K. Lowden
On Mon, 4 Nov 2013 13:01:37 +0100 Gert Van Assche wrote: > Thanks James -- the select query is something I could do, but the > update one I could not get that one right. > I was considering to create a new table based on the select query, > but since the real data set is millions of records, an

Re: [sqlite] Disparity between query time in SQLite Administrator and Flash Pro

2013-11-06 Thread SongbookDB
Just got a reply re the version Flash uses - it's 3.7.4 RC4, which is later than what SQLite Administrator uses (3.5.1). Is there a program like SQLite Administrator that will let me load a particular version of SQLite, so my testing will match the version in Flash AIR? FYI - he used this to get

[sqlite] SQLite_version

2013-11-06 Thread Klaas V
On Mon, Nov 4, 2013 at 6:12 AM, SongbookDB wrote: > Thanks Clemens > > Flash gives the error - no such function: 'sqlite_version' > > SQLite Administrator says 3.5.1 > > I'll see what the Adobe community say. Or just .v - [[zephyros|db]] sqlite3 SQLite ve

Re: [sqlite] Disparity between query time in SQLite Administrator and Flash Pro

2013-11-06 Thread Simon Slavin
On 7 Nov 2013, at 12:09am, SongbookDB wrote: > The database seems to write fine. I have it loading into a datagrid in my > Flash AIR desktop app, from where I read it and make edits to it. I don't understand how any SQLite app can return the error you gave: >> Flash gives the error - no such f

Re: [sqlite] Disparity between query time in SQLite Administrator and Flash Pro

2013-11-06 Thread SongbookDB
Gidday Stephen The database seems to write fine. I have it loading into a datagrid in my Flash AIR desktop app, from where I read it and make edits to it. On Thu, Nov 7, 2013 at 2:54 AM, Stephen Chrzanowski wrote: > The 15 seconds "smells" like a time out. I've found in the past where if > the

Re: [sqlite] Bug Report - Analyzer app

2013-11-06 Thread RSmith
Thank you kindly and forgive me for not seeing this earlier... It works perfectly. On 2013/11/06 22:53, Richard Hipp wrote: http://www.sqlite.org/src/info/42a11e7464 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-

Re: [sqlite] Bug Report - Analyzer app

2013-11-06 Thread Richard Hipp
http://www.sqlite.org/src/info/42a11e7464 On Wed, Nov 6, 2013 at 3:48 PM, RSmith wrote: > Sorry to be a bother again, but no replies on this thread yet, and I'm > still getting un-importable result sets from the sqlite3_analyzer.exe > program. > > It's not exactly a high-profile bug, and I coul

Re: [sqlite] Bug Report - Analyzer app

2013-11-06 Thread RSmith
Sorry to be a bother again, but no replies on this thread yet, and I'm still getting un-importable result sets from the sqlite3_analyzer.exe program. It's not exactly a high-profile bug, and I could just use a replace macro of sorts, but I'd rather it work as intended. I'm thinking this would b

Re: [sqlite] sqlite db getting corrupt on power outage scenarios

2013-11-06 Thread Richard Hipp
On Wed, Nov 6, 2013 at 2:10 PM, Mayank Kumar (mayankum) wrote: > Hi Sqlite Users > I am running into a situation where sometimes after the power is restored > my sqlite db running on linux is corrupted. Here is what I see with > integrity_check:- > > *** in database main *** > Page 895: btreeInitP

Re: [sqlite] Handling Pictures

2013-11-06 Thread Igor Tandetnik
For file-to-database path, don't use QPixmap or QImage or anything like that. Use QFile::readAll to read bytes from file into a QByteArray, then QByteArray::data() and sqlite3_bind_blob (or equivalent in your SQLite wrapper, which I'm not familiar with) to bind the data to a SQL statement. Whe

[sqlite] sqlite db getting corrupt on power outage scenarios

2013-11-06 Thread Mayank Kumar (mayankum)
Hi Sqlite Users I am running into a situation where sometimes after the power is restored my sqlite db running on linux is corrupted. Here is what I see with integrity_check:- *** in database main *** Page 895: btreeInitPage() returns error code 11 On tree page 2 cell 765: Child page depth diffe

Re: [sqlite] Handling Pictures

2013-11-06 Thread Petite Abeille
On Nov 6, 2013, at 8:00 PM, Richard Hipp wrote: > See http://www.sqlite.org/whentouse.html#appfileformat for further thoughts > on this. SQLite is commonly used as an application file format. In such > cases, it is entirely appropriate to store content files directly in the > database, rather

Re: [sqlite] Handling Pictures

2013-11-06 Thread Richard Hipp
On Wed, Nov 6, 2013 at 1:54 PM, Petite Abeille wrote: > > On Nov 6, 2013, at 7:42 PM, Ulrich Goebel wrote: > > > Every hint is welcome! > > Don't store your files in the database. Store them on the file system, as > the Almighty intended. Much simpler and flexible altogether. > > Perhaps of inte

Re: [sqlite] Handling Pictures

2013-11-06 Thread Petite Abeille
On Nov 6, 2013, at 7:42 PM, Ulrich Goebel wrote: > Every hint is welcome! Don't store your files in the database. Store them on the file system, as the Almighty intended. Much simpler and flexible altogether. Perhaps of interest: http://www.sqlite.org/intern-v-extern-blob.html

[sqlite] Handling Pictures

2013-11-06 Thread Ulrich Goebel
Hallo again, now I have to handle pictures. In a SQLite database I would like to save pictures from people. So I made a table CREATE table pictures (id integer, pic blob) With PyQT4 I build a formular where I want to show the pictures. (In fact the formular shows data from a person, and even

Re: [sqlite] Groups and members

2013-11-06 Thread Ulrich Goebel
That gives me the solution - thank You! Am 06.11.2013 14:45, schrieb Igor Tandetnik: On 11/6/2013 6:55 AM, Ulrich Goebel wrote: Now my problem: For a given person (that is a given p_id) I would like to get a list of all (!) groups, marked wether p_id is a member of it or not. If p_id=1 and this

Re: [sqlite] Disparity between query time in SQLite Administrator and Flash Pro

2013-11-06 Thread Stephen Chrzanowski
The 15 seconds "smells" like a time out. I've found in the past where if the database being accessed is in read only mode (Either by filesystem permissions, or just the plain old READ ONLY file attribute) SQLite pauses. I can dupe this with using any utility, be it the SQLite CLI or PHP or SQLite

Re: [sqlite] Groups and members

2013-11-06 Thread Dominique Devienne
On Wed, Nov 6, 2013 at 3:53 PM, Igor Tandetnik wrote: > On 11/6/2013 8:50 AM, Dominique Devienne wrote: > >> On Wed, Nov 6, 2013 at 2:45 PM, Igor Tandetnik >> wrote: >> >> select g_id, :mypid, >>>(case when r.p_id is null then 'no' else 'yes' end) is_member >>> from g left join r on (g.g_id

Re: [sqlite] Groups and members

2013-11-06 Thread Igor Tandetnik
On 11/6/2013 8:50 AM, Dominique Devienne wrote: On Wed, Nov 6, 2013 at 2:45 PM, Igor Tandetnik wrote: select g_id, :mypid, (case when r.p_id is null then 'no' else 'yes' end) is_member from g left join r on (g.g_id = r.g_id and r.m_id = :mypid); order by (r.p_id is null), g_id; Nitpick: I

Re: [sqlite] Groups and members

2013-11-06 Thread Clemens Ladisch
Dominique Devienne wrote: > On Wed, Nov 6, 2013 at 2:45 PM, Igor Tandetnik wrote: > > ... g left join r on (g.g_id = r.g_id and r.m_id = :mypid) ... > > Nitpick: I'd put r.m_id = :mypid in a separate where clause, rather than > being on the join's ON clause. At least that's the way I'd write it (I

Re: [sqlite] Colons (was: RE: Groups and members)

2013-11-06 Thread Drake Wilson
Quoth Rob Richardson , on 2013-11-06 14:08:34 +: > In Igor's post below, what is the meaning of the colon in front of mypid? Parameters/placeholders. http://sqlite.org/lang_expr.html#varparam ---> Drake Wilson ___ sqlite-users mailing list sqlit

[sqlite] Colons (was: RE: Groups and members)

2013-11-06 Thread Rob Richardson
In Igor's post below, what is the meaning of the colon in front of mypid? RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Wednesday, November 06, 2013 8:45 AM To: sqlite-users@sqlite.org Subject: Re:

Re: [sqlite] Groups and members

2013-11-06 Thread Dominique Devienne
On Wed, Nov 6, 2013 at 2:45 PM, Igor Tandetnik wrote: > select g_id, :mypid, > (case when r.p_id is null then 'no' else 'yes' end) is_member > from g left join r on (g.g_id = r.g_id and r.m_id = :mypid); > order by (r.p_id is null), g_id; > That's what I said! :) (our posts crossed, and you'r

Re: [sqlite] Groups and members

2013-11-06 Thread Dominique Devienne
On Wed, Nov 6, 2013 at 12:55 PM, Ulrich Goebel wrote: > Is it a matter of a "simple" SELECTs with joined tables? Have I to think > about subqueries? Or even Compund SELECTs (UNION, INTERSECT)? > > It would be great to get some hints! Sounds like a job for http://en.wikipedia.org/wiki/Join_(SQL)

Re: [sqlite] Groups and members

2013-11-06 Thread Igor Tandetnik
On 11/6/2013 6:55 AM, Ulrich Goebel wrote: Now my problem: For a given person (that is a given p_id) I would like to get a list of all (!) groups, marked wether p_id is a member of it or not. If p_id=1 and this person is member of groups 4, 8 and 9, SELECT g_id, p_id, p_is_member_of_g ... shoul

Re: [sqlite] SQLite database upgradation

2013-11-06 Thread Richard Hipp
On Tue, Nov 5, 2013 at 2:10 PM, Krishnaraj S wrote: > Hi Sir, > > I have got an issue with the SQLite database, in which I desperately needs > your support. Actually I had RT 3.8.10 installed with the SQLite database > Version 3.7.4 . Now I have upgraded my RT to version 4.0.7, but now I am > una

[sqlite] SQLite database upgradation

2013-11-06 Thread Krishnaraj S
Hi Sir, I have got an issue with the SQLite database, in which I desperately needs your support. Actually I had RT 3.8.10 installed with the SQLite database Version 3.7.4 . Now I have upgraded my RT to version 4.0.7, but now I am unable to use the SQLite 3.7.4 in this new version of RT. I need you

[sqlite] Groups and members

2013-11-06 Thread Ulrich Goebel
Hallo, I thought it is a trivial problem, but I don't find the solution... I have to tables p and g, p are people which can be members of groups stored in g. It's a n-to-n relation, so I made a third table r which brings together the members and groups. Of course that is done by CREATE table