Re: [sqlite] Query critique

2010-07-10 Thread Virgilio Alexandre Fornazin
Calling UPPER() for each field/value while querying is a pain, if you can assume the names are all in uppercase (forcing this in your program before passing them to SQlite), you could speed up things a lot. But you need to analyze what´s happening inside SQlite to check if indices are used, etc.

[sqlite] why is this table locked?

2010-07-10 Thread Sam Carleton
I am on Window 7, opening an existing database with these flags: SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE Then I get a value from one table, begin a transaction, create a temp customer table, fill it with the current values from the customer table. Here is that SQL run

Re: [sqlite] Query critique

2010-07-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/09/2010 01:54 AM, Ian Hardingham wrote: > And here is my query (written in a script language): Are you actually getting correct answers from this? > upper('?') Unless your script language includes a SQL parser, that does not do what you

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Eric Smith-29 wrote: > > It could be that you want to create a real table that can be read from > and written to. I would then ask why you think you need to do that. Thank you very much for your help! Now I've joined the tables using the "join" query. I think I need to create the new table

Re: [sqlite] Understanding how to use locking optimally

2010-07-10 Thread Simon Slavin
On 10 Jul 2010, at 8:27pm, Alan Chandler wrote: > I am actually not using C, but the php routines for this. I have my > suspicions, but I can't find it explicity stated anywhere that the > PHP::SQLITE3 module behaves exactly like the C routines but that using > PHP::PDO abstraction layer

[sqlite] Understanding how to use locking optimally

2010-07-10 Thread Alan Chandler
I have just joined this mailing list, because searching the archives I have not found much related to locking. I am not completely new to SQLite, having previously used it when I wrote my latest version of a chat program, where I migrated the database over to from mysql. In my first attempt

Re: [sqlite] open db cx to fork(2)d children

2010-07-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/10/2010 07:12 AM, Eric Smith wrote: > Your wrapper is nice -- have you considered folding something like it > into the core (disabled by default, enabled by a compile-time flag) and > submitting it to drh for official adoption? DRH and the

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Simon Slavin
On 10 Jul 2010, at 5:39pm, Calimeron wrote: > -- One table is more than 30.000 lines, the other is more than 50.000 lines. > I've understood from the video tutorial that the program (I'm using > http://www.sqlite.org/sqlite-3_6_23_1.zip) will first compile the entire > list 30.000 x 50.000 = 1.5

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Thanks for your reply. Before I try to understand your post, because you are here now and maybe not later: I will take the result (of 50.000 + lines), and further filter it to 5.000 + lines, and then split that into 13 tables of 400+ lines, which I'll be manipulating in excel, and print out to

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Eric Smith
Calimeron wrote: > >What do you mean, "save"? > > So that when you're done, you have 3 tables "Chinese," "English," "Merged" > or the original 2, but with data from the one into the other. > > I don't know the terms or the procedure, but I'd like to have a new table > that has the

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
>What do you mean, "save"? So that when you're done, you have 3 tables "Chinese," "English," "Merged" or the original 2, but with data from the one into the other. I don't know the terms or the procedure, but I'd like to have a new table that has the Chinese and English mixed, which I then can

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Eric Smith
Calimeron wrote: > I've understood that the program (I'm > using http://www.sqlite.org/sqlite-3_6_23_1.zip) will first compile the > entire list 30.000 x 50.000 = 1.5 BILLION lines, after which it filters > it. One of SQLite's primary goals in life is to fit into a tiny memory footprint.

Re: [sqlite] Reg: In Memory Database Using SQLite

2010-07-10 Thread ca44
Yes, please do send it to me. Thx -C - Original Message - From: "Subhadeep Ghosh" To: "General Discussion of SQLite Database" Sent: Saturday, July 10, 2010 7:42:03 AM Subject: Re: [sqlite] Reg: In Memory Database Using

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Okay, so now I've gotten a bit further, but: -- One table is more than 30.000 lines, the other is more than 50.000 lines. I've understood from the video tutorial that the program (I'm using http://www.sqlite.org/sqlite-3_6_23_1.zip) will first compile the entire list 30.000 x 50.000 = 1.5

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Thanks for your reply! I'm now trying to get it to work, with the help of your post and this nice http://www.youtube.com/watch?v=NcrZoHselPk video tutorial about joining -- View this message in context:

Re: [sqlite] Reg: In Memory Database Using SQLite

2010-07-10 Thread Subhadeep Ghosh
Hi Chris, I had attached the source code but it mysteriously vanished. I'm guessing that this mailing list does not support mail attachments. However, if you want I could mail it to you on your personal mail ID. Thank you and regards, Subhadeep. On Sat, Jul 10, 2010 at 8:09 PM,

Re: [sqlite] Reg: In Memory Database Using SQLite

2010-07-10 Thread ca44
Hi Subhadeep, I'm not seeing the source code included anywhere in your email. Thx -Chris - Original Message - From: "Subhadeep Ghosh" To: sqlite-users@sqlite.org Sent: Wednesday, July 7, 2010 1:51:28 PM Subject: [sqlite] Reg: In Memory Database

Re: [sqlite] importing data from file with 3 colums to table with 4 columns

2010-07-10 Thread ca44
Thanks Monte for your response. I am still pretty new to SQlite, but it looks very similar to what Simon suggested. I think it would work just as well. From my perspective the ideal way to do this would be to specify the columns names the following data in the file is to load into.

Re: [sqlite] open db cx to fork(2)d children

2010-07-10 Thread Eric Smith
Roger Binns wrote: > I'll bet you are actually getting exit(3) which means anything > registered with atexit will be run. (SQLite does not register with > atexit.) I knew what Nico meant :) just repeated him for expositional clarity (deeming the distinction to be unimportant for my

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Eric Smith
Calimeron wrote: > Chinese Char. No. Chinese Char. English Def. No.English Def. > 1 Char1 1 Def1 > 2 Char2 2 Def2 > 2 Char2 3 Def3

[sqlite] Jan Neerbek is out of the office.

2010-07-10 Thread Jan Neerbek
I will be out of the office starting 09-07-2010 and will not return until 02-08-2010. I will respond to your message when I return. For urgent matters you may contact BRE ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Another method would be to add a column to the English table, and in that insert the Chinese character that corresponds with the number in "Chinese Char. No." -- View this message in context: http://old.nabble.com/Noobie-question-about-importing-data-into-table-tp29126116p29126166.html Sent

[sqlite] Noobie question about importing data into table

2010-07-10 Thread Calimeron
Hi, I'm a noobie. I would have liked to first search this forum, but I don't even know the search terms I should use ... I'm using the firefox plugin "Sqlite Manager" to manipulate the data. Question: I have two tables: TABLE 1: Chinese Char. No. Chinese Char. 1

Re: [sqlite] importing data from file with 3 colums to tabl e with 4 columns

2010-07-10 Thread Monte Milanuk
Just because I was bored ;) I decided to take a stab at this one as well (following Simon's excellent guidance). I had thought because of what it says in the FAQ here: http://sqlite.org/faq.html#q1 that it should be possible to import the values directly into the final table and have sqlite

[sqlite] Query critique

2010-07-10 Thread Ian Hardingham
Hey guys. I have a query which is very slow, and was wondering if there was any advice you guys had on it. Here are two table definitions: CREATE TABLE IF NOT EXISTS globalRankingTable (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL UNIQUE, ranking TEXT, score REAL, record TEXT);