Re: [sqlite] Complex Query

2008-03-21 Thread P Kishor
On 3/21/08, Derek Developer <[EMAIL PROTECTED]> wrote: > Hello, > > Thank you for your help with SQLite > > > Also I would really like to figure out how to respond to a particular thread > rather than starting a new thread. Is it possible from the digest? I have no idea. I don't subscribe to the

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-21 Thread Kees Nuyt
On Fri, 21 Mar 2008 08:54:22 +0100, you wrote: >I actually created all my views by means of "CREATE VIEW ... AS ...", and >(as Mr. Hipp said) these views was accepted from SQLite as "valid" SQL >statements. >The problem (was) that right now I couldn't open the DB anymore, due to the >malformed sch

Re: [sqlite] Multiple Row Updates

2008-03-21 Thread John Stanton
Use this sequence - sqlite3_prepare_v2 while not finished sqlite3_bind_xxx sqlite3_step until SQLITE_DONE sqlite3_reset repeat sqlite3_finalize The sqlite3_reset readies the compiled statement for binding with another value. Derek Developer wrote: > Jus

[sqlite] dot locking

2008-03-21 Thread Richard Klein
I seem to recall a post from someone (drh?) stating that the Old School dot-locking routines one sees in the amalgamation have not yet been thoroughly tested and should not be used. Is this still true? Thanks, - Richard ___ sqlite-users mailing list sql

[sqlite] Multiple Row Updates

2008-03-21 Thread Derek Developer
Just wanted to check that there is no "reset" statement that I can use with UPDATE's. My understanding is that for multiple Row updates the complete sequence needs to be executed for each row ie: "UPDATE mytable SET ' name=?, street=?, Phone=? WHERE ROWID=333" Prepare Bind the data step final

Re: [sqlite] Formating SUM?

2008-03-21 Thread P Kishor
On 3/21/08, Gilles Ganault <[EMAIL PROTECTED]> wrote: > Hello > > I searched on the web site and "The definitive guide to SQLite", but > didn't find if it's possible to format the output from the SUM() > function: > > SELECT SUM(invoice_amount) AS Amount FROM invoice"; > > => With invoice_amou

[sqlite] Formating SUM?

2008-03-21 Thread Gilles Ganault
Hello I searched on the web site and "The definitive guide to SQLite", but didn't find if it's possible to format the output from the SUM() function: SELECT SUM(invoice_amount) AS Amount FROM invoice"; => With invoice_amount defined as TEXT, I'd like this number to be formatted as "100.000,00',

Re: [sqlite] Moving port from 3.5.1 to 3.5.7...

2008-03-21 Thread Mark Spiegel
The closest memory implementation would be the default one. The other implementations that try to do their own pool management are unacceptable as memory system wide to too valuable to allow SQLite to allocate pool that it is not currently using. I am also fundamentally opposed to trying to

Re: [sqlite] Moving port from 3.5.1 to 3.5.7...

2008-03-21 Thread drh
Mark Spiegel <[EMAIL PROTECTED]> wrote: > I'm looking to jump my code port forward from 3.5.1 to 3.5.7. > > Clearly I have some memory management work to do since > SQLITE_OMIT_MEMORY_ALLOCATION support has been dropped. None of the > existing allocation implementations look acceptable so I'll

[sqlite] Moving port from 3.5.1 to 3.5.7...

2008-03-21 Thread Mark Spiegel
I'm looking to jump my code port forward from 3.5.1 to 3.5.7. Clearly I have some memory management work to do since SQLITE_OMIT_MEMORY_ALLOCATION support has been dropped. None of the existing allocation implementations look acceptable so I'll have to roll my own, but that looks pretty strai

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-21 Thread Stephen Oberholtzer
On Fri, Mar 21, 2008 at 10:12 AM, Noah Hart <[EMAIL PROTECTED]> wrote: > Suggestion to SQLite Developers ... Have PRAGMA integrity_check reparse > the SQL in sqlite_master, looking for errors. > > Regards, > > Noah I don't think that would actually help. It seems that this problem was caused b

Re: [sqlite] Tables dropped (mac)

2008-03-21 Thread Griggs, Donald
=== Re: Maybe I left off the .db? Sqlite doesn't enforce filename restrictions -- you can name the file simply "test" if you prefer. Re: Am I right that you can only have one database file per sqlite installation? I'm not certain I understand correct

Re: [sqlite] Tables dropped (mac)

2008-03-21 Thread Janis Rough
Well I missed that in the doucmentation, thanks. I just re-read it. Although at the prompt I thought I did put test as the filename. Maybe I left off the .db? So this should be to get the prompt and save the fiel. sqlite3 test.db > Am I right that you can only have one database file per sqlite

Re: [sqlite] Tables dropped (mac)

2008-03-21 Thread John Stanton
What was your filename? Janis Rough wrote: > I created some tables at the sqlite prompt using the terminal window on a > Mac. I checked with .tables and .schema and they were created and I > inserted data. I closed the terminal window and went back later. At the > sqlite prompt there were no ta

[sqlite] added ticket 3007 as a feature request

2008-03-21 Thread Ken
Ticket: 3007 Add, #define SQLITE_OPEN_OMIT_JOURNAL 0x8000 Test this flag and set the omit_journal parameter to Btree factory... To cause sqlite to omit journal creation. Obviously this has serious impact to a databases recoverability. But when the Durability component of ACID is not

[sqlite] how to reply?

2008-03-21 Thread L B
Sorry for this post, but I can't find a way to reply to a post. It seems that I can only reply via email to the person who answered me. How to reply and see my answer on this site? thanks - Be a better friend, newshound, and know-it-all with Yahoo! Mobi

Re: [sqlite] group by optimization

2008-03-21 Thread Igor Tandetnik
L B <[EMAIL PROTECTED]> wrote: > Hi all, > I have this query: > > select CATALOGUES.idcatalogue, CATALOGUES.type, PERSONS.surname, > max(HISTORY.startingfrom) as maxdate > FROM PERSONS > INNER JOIN CATALOGUES > ON CATALOGUES.idperson = PERSONS.idperson > INNER JOIN HISTORY >

[sqlite] group by optimization

2008-03-21 Thread L B
Hi all, I have this query: select CATALOGUES.idcatalogue, CATALOGUES.type, PERSONS.surname, max(HISTORY.startingfrom) as maxdate FROM PERSONS INNER JOIN CATALOGUES ON CATALOGUES.idperson = PERSONS.idperson INNER JOIN HISTORY ON HISTORY.idcatal

Re: [sqlite] endless loop example

2008-03-21 Thread Ken
Just to quantify a cartisian join is a join operation that returns the product of the rows. So in the example given episodes 8 foods100 food_episodes 800 episodes e1, foods_episodes fe1, foods f, episodes e2, foods_episodes fe2 Result rows = 8*800*100*8*800 = 4,096,000,000 rows... (ov

Re: [sqlite] Major memory leak

2008-03-21 Thread Rob Richardson
My SQLite library is built from the single translation unit sqlite.c/sqlite.h. That file contains the version number 3.3.17. I do not have valgrind, but circumstantial evidence that this is a SQLite problem is strong. When stepping through my code, I see that my application's memory jumps by ove

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-21 Thread Noah Hart
Suggestion to SQLite Developers ... Have PRAGMA integrity_check reparse the SQL in sqlite_master, looking for errors. Regards, Noah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MarcoN Sent: Friday, March 21, 2008 12:54 AM To: General Discussion of SQL

Re: [sqlite] New crashes with SQLite 3.5.7

2008-03-21 Thread drh
"Peter Weilbacher" <[EMAIL PROTECTED]> wrote: > On Thu, 20 Mar 2008 17:52:21 UTC, drh wrote: > > > Any additional information you can send, such as the size of > > the database file at the point of failure, or the exact line > > on which the problem occurs, will be appreciated. (I know the > > bu

Re: [sqlite] Tables dropped (mac)

2008-03-21 Thread Griggs, Donald
Regarding: I created some tables at the sqlite prompt using the terminal window on a Mac. I checked with .tables and .schema and they were created and I inserted data. I closed the terminal window and went back later. At the sqlite prompt there were no tables. I tried .tables and .sche

[sqlite] Tables dropped (mac)

2008-03-21 Thread Janis Rough
I created some tables at the sqlite prompt using the terminal window on a Mac. I checked with .tables and .schema and they were created and I inserted data. I closed the terminal window and went back later. At the sqlite prompt there were no tables. I tried .tables and .schema and nothing. So w

Re: [sqlite] Use of two columns for a key and query on first clm.

2008-03-21 Thread Wilson, Ron P
order by id is not guaranteed. use 'order by id' and it will. Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neville Franks Sent: Thursday, March 20, 2008 8:07 PM To: sqlite-users@sqli

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-21 Thread MarcoN
I actually created all my views by means of "CREATE VIEW ... AS ...", and (as Mr. Hipp said) these views was accepted from SQLite as "valid" SQL statements. The problem (was) that right now I couldn't open the DB anymore, due to the malformed schema error. Thanks again Marco __

Re: [sqlite] endless loop example

2008-03-21 Thread Dan
On Mar 21, 2008, at 12:17 PM, Derek Developer wrote: > In trying to break my code with the seinfeld database examples, I > found this. > SELECT f.name as food, e1.name, e1.season, e2.name, e2.season FROM > episodes e1, foods_episodes fe1, foods f, episodes e2, > foods_episodes fe2 > Why doe