[sqlite] Need sql query help

2006-06-25 Thread onemind
Hi, I was hoping someone could tell me if it was possible to select all words containing ceratin letters. Eg If i had a table wit a word column that had a huge list of words and i wanted to select every word that contained all these letters qdsa. Then it would return the words: quads

Re: [sqlite] problem with creating a table

2006-06-25 Thread Derrell . Lipman
Bijan Farhoudi [EMAIL PROTECTED] writes: I am trying to create table and I would like to name one of the columns order, but pysqlite does not like it. I do not want to have order__ or any thing like that. for example the following command does not work: cur.execute('create table foo(i

[sqlite] Where is the sqlite3.h file?

2006-06-25 Thread onemind
Hi, I am trying to use the .dll with c but it doesn't come with the eader file. Also, what is the.def file that comes with it? Thanks for any info -- View this message in context: http://www.nabble.com/Where-is-the-sqlite3.h-file--t1844421.html#a5034422 Sent from the SQLite forum at

Re: [sqlite] problem with creating a table

2006-06-25 Thread Bijan Farhoudi
[EMAIL PROTECTED] wrote: Bijan Farhoudi [EMAIL PROTECTED] writes: I am trying to create table and I would like to name one of the columns order, but pysqlite does not like it. I do not want to have order__ or any thing like that. for example the following command does not work:

Re: [sqlite] Sqlite crashes when i imort huge list

2006-06-25 Thread onemind
Aha, sorry Richard, it seems you may have been right. I downloaded a different gui call SQLite Administrator and it is importing now. The first gui i used, used 100% of my cpu and crashes, this new one doesn't use much but it is a sloow process.Have been running it for about 10 mins

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
* onemind [EMAIL PROTECTED] [2006-06-25 16:05]: If i had a table wit a word column that had a huge list of words and i wanted to select every word that contained all these letters qdsa. SELECT * FROM words WHERE word LIKE '%q%' AND word LIKE '%d%' AND word

Re: [sqlite] problem with creating a table

2006-06-25 Thread A. Pagaltzis
* Bijan Farhoudi [EMAIL PROTECTED] [2006-06-25 16:35]: Thanks for your answer but still I am getting an error message: sqlite create table foo(i integer, [order] integer); sqlite .sch CREATE TABLE foo(i integer, [order] integer); sqlite insert into foo values(1,2); sqlite select order from

Re: [sqlite] Need sql query help

2006-06-25 Thread onemind
Thanks, The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. What technology would be best suited for this task? I just assumed that a databse would be ideal, why do you say sql isn't suited for this and

Re: [sqlite] problem with creating a table

2006-06-25 Thread Bijan Farhoudi
A. Pagaltzis wrote: * Bijan Farhoudi [EMAIL PROTECTED] [2006-06-25 16:35]: Thanks for your answer but still I am getting an error message: sqlite create table foo(i integer, [order] integer); sqlite .sch CREATE TABLE foo(i integer, [order] integer); sqlite insert into foo values(1,2); sqlite

[sqlite] Re: problem with creating a table

2006-06-25 Thread Igor Tandetnik
Bijan Farhoudi farhoudi-RazJlWb3c/[EMAIL PROTECTED] wrote: A. Pagaltzis wrote: SELECT [order] FROM foo But how would you know the name of the col is order not [order]? Square brackets are not part of the name. They are delimiters that indicate that whatever's inside is to be treated

Re: [sqlite] problem with creating a table

2006-06-25 Thread Derrell . Lipman
Bijan Farhoudi [EMAIL PROTECTED] writes: A. Pagaltzis wrote: * Bijan Farhoudi [EMAIL PROTECTED] [2006-06-25 16:35]: Thanks for your answer but still I am getting an error message: sqlite create table foo(i integer, [order] integer); sqlite .sch CREATE TABLE foo(i integer, [order] integer);

RE: [sqlite] Re: problem with creating a table

2006-06-25 Thread Fred Williams
-Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Sunday, June 25, 2006 10:19 AM To: SQLite Subject: [sqlite] Re: problem with creating a table Bijan Farhoudi farhoudi-RazJlWb3c/[EMAIL PROTECTED] wrote: A. Pagaltzis wrote: SELECT [order] FROM foo

Re: [sqlite] Need sql query help

2006-06-25 Thread Derrell . Lipman
onemind [EMAIL PROTECTED] writes: What technology would be best suited for this task? I just assumed that a databse would be ideal, why do you say sql isn't suited for this and what is? Take a look at the Controllable Regex Mutilator, CRM114, http://crm114.sourceforge.net. It has mechanisms

Re: [sqlite] Need sql query help

2006-06-25 Thread Ulrik Petersen
onemind wrote: Thanks, The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. What technology would be best suited for this task? I just assumed that a databse would be ideal, why do you say sql isn't

[sqlite] The fastest way to change the data of a table?

2006-06-25 Thread Alexei Alexandrov
Hi, Basically, I need to do the following: given a big-big table, I need to iterate through all its rows and change a column in about half the rows. The contents of the column to change depends on other columns, but only partially, so triggers won't work here. What would be the fastest way to

Re: [sqlite] problem with creating a table

2006-06-25 Thread John Stanton
Bijan Farhoudi wrote: Hi, I am trying to create table and I would like to name one of the columns order, but pysqlite does not like it. I do not want to have order__ or any thing like that. for example the following command does not work: cur.execute('create table foo(i integer, order

Re: [sqlite] Which is most appropriate encoding ?

2006-06-25 Thread Alexei Alexandrov
While developing Win32/MFC Application (with Visual C++ 6.0) - Application uses SQLite DB for it's data storage - Application must run on most windows (Windows 98, ME, NT, XP, 2000) - User should be able to copy Database from one PC to another PC (one PC may be running Windows 98 and another one

Re: [sqlite] Need sql query help

2006-06-25 Thread John Stanton
onemind wrote: Hi, I was hoping someone could tell me if it was possible to select all words containing ceratin letters. Eg If i had a table wit a word column that had a huge list of words and i wanted to select every word that contained all these letters qdsa. Then it would return the

Re: [sqlite] Need sql query help

2006-06-25 Thread John Stanton
A. Pagaltzis wrote: * onemind [EMAIL PROTECTED] [2006-06-25 16:05]: If i had a table wit a word column that had a huge list of words and i wanted to select every word that contained all these letters qdsa. SELECT * FROM words WHERE word LIKE '%q%' AND word LIKE

Re: [sqlite] Need sql query help

2006-06-25 Thread John Stanton
onemind wrote: Thanks, The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. What technology would be best suited for this task? I just assumed that a databse would be ideal, why do you say sql isn't

Re: [sqlite] problem with creating a table

2006-06-25 Thread A. Pagaltzis
* Bijan Farhoudi [EMAIL PROTECTED] [2006-06-25 17:05]: A. Pagaltzis wrote: .headers on SELECT [order] FROM foo But how would you know the name of the col is order not [order]? That’s what `.headers on` was supposed to demonstrate. Regards, -- Aristotle Pagaltzis //

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
* Ulrik Petersen [EMAIL PROTECTED] [2006-06-25 17:55]: 5) Use the function with the regex '[spqd]' to search for words containing the letters s, p, q, OR d. Doing it for all letters (AND) may be doable with a single regex, It is doable with an NFA engine like PCRE, but it’s complicated to

Re: [sqlite] Need sql query help

2006-06-25 Thread A. Pagaltzis
* onemind [EMAIL PROTECTED] [2006-06-25 17:00]: The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. 200,000 words is nothing. If they’re 5 letters on average, that’s some 1.1MB of data. You can grep

Re: [sqlite] Need sql query help

2006-06-25 Thread John Stanton
Ulrik Petersen wrote: Hi, responding to myself... Ulrik Petersen wrote: onemind wrote: Thanks, The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. What technology would be best suited for this

Re: [sqlite] Need sql query help

2006-06-25 Thread John Stanton
A. Pagaltzis wrote: * onemind [EMAIL PROTECTED] [2006-06-25 17:00]: The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. 200,000 words is nothing. If they’re 5 letters on average, that’s some 1.1MB of

Re: [sqlite] The fastest way to change the data of a table?

2006-06-25 Thread DJ Anubis
Alexei Alexandrov a écrit : Hi, Basically, I need to do the following: given a big-big table, I need to iterate through all its rows and change a column in about half the rows. The contents of the column to change depends on other columns, but only partially, so triggers won't work here.

Re: [sqlite] problem with creating a table

2006-06-25 Thread DJ Anubis
A. Pagaltzis a écrit : * Bijan Farhoudi [EMAIL PROTECTED] [2006-06-25 17:05]: A. Pagaltzis wrote: .headers on SELECT [order] FROM foo But how would you know the name of the col is order not [order]? That’s what `.headers on` was supposed to demonstrate.

Re: [sqlite] Need sql query help

2006-06-25 Thread Jeremy Hinegardner
On Sun, Jun 25, 2006 at 07:54:13AM -0700, onemind wrote: The thing is, i am going to need to use different letters each time to search through over 200,000 words in a database and it needs to be fast. The quick and dirty way to do this using a sqlite would be to keep a separate column from the

[sqlite] SQLite Path Problem On Fedora Core 5

2006-06-25 Thread Robert L Cochran
For a long time, I've been playing with the Sqlite product from http://www.sqlite.org . I started doing this before Fedora Core 4, and would compile the source code to the default install directories of /usr/local/bin and /usr/local/lib, etc. This worked great until Fedora Core started packaging

Re: [sqlite] Need sql query help

2006-06-25 Thread onemind
Thanks for all of the great ideas :) Plently of techniques to work on there. Just incase your interested, i woke up this morning and all the words finally made it into sqlite :) It took over 8 hours, so if anyone could tell me a text command that would do this same task of importing a txt file

Re: [sqlite] Need sql query help

2006-06-25 Thread C.Peachment
On Sun, 25 Jun 2006 18:24:50 -0700 (PDT), onemind wrote: It took over 8 hours, so if anyone could tell me a text command that would do this same task of importing a txt file into a table through the sqlite3 command line that would be great. It must be the gui slowing it down somehow. Repeating

Re: [sqlite] SQLite Path Problem On Fedora Core 5

2006-06-25 Thread DJ Anubis
Robert L Cochran a écrit : However, on Fedora Core 5, my path is set so that objects on /usr/local/bin are found before those on /usr/bin. I'm not sure how this is happening; perhaps /etc/profile? The result seems to be that even if sqlite 3.3.3 was installed by yum, executing /usr/bin/sqlite3

Re: [sqlite] Preferred way to copy/flush new memory db to disk db ?

2006-06-25 Thread C.Peachment
On Sun, 25 Jun 2006 01:58:10 -0700 (PDT), RohitPatel wrote: Intial database will have about 30+ tables, very few records in each of these tables, one or two indices on some tables. For such a small database, why not create it directly on disk? The time required should be just a one second or

[sqlite] Call sqlite3_reset multiple times

2006-06-25 Thread Kai Wu
Hello, sqltie3_stmt *stmt; sqlite3_prepare(...stmt...); sqlite3_reset(stmt); sqlite3_reset(stmt); // Is this OK? it looks sqlite3_prepare allocates resource and sqlite3_reset deallocates them, is it ok to call sqlite_reset on the same statement pointer multiple times without preparing it in

Re: [sqlite] Virtual Table: xRowID shortcommings

2006-06-25 Thread Ralf Junker
2. In case the virtual table implementation needs to allocate memory in order to uniquely describe a row/item, this memory needs to be freed when no longer used. As I see it, there is no such method in the Virtual Table implementation. Maybe the transaction part of the virtual table API

Re: [sqlite] Sqlite crashes when i imort huge list

2006-06-25 Thread C.Peachment
On Sat, 24 Jun 2006 20:10:58 -0700 (PDT), onemind wrote: I am using the sqlite gui and click import table from csv. I select a txt file that contain over 200,000 words in a list. Sqlite works fine with a smaller list of 200-300 words but when i import my big list, it hangs for ages or completely

Re: [sqlite] Call sqlite3_reset multiple times

2006-06-25 Thread drh
Kai Wu [EMAIL PROTECTED] wrote: Hello, sqltie3_stmt *stmt; sqlite3_prepare(...stmt...); sqlite3_reset(stmt); sqlite3_reset(stmt); // Is this OK? This is OK. A statement is created by sqlite3_prepare and is destroyed by sqlite3_finalize. sqlite3_reset can be called as many times as you

Re: [sqlite] Sqlite crashes when i imort huge list

2006-06-25 Thread C.Peachment
There was a small error in my previous post. The 'begin transaction;' line was missed when I copied the text out of the script and editted it to remove the code around the text. On Sat, 24 Jun 2006 20:10:58 -0700 (PDT), onemind wrote: I am using the sqlite gui and click import table from csv. I

Re: [sqlite] Dumping Memory-DB to File

2006-06-25 Thread RohitPatel9999
Hi I need some help on this. I need to create a new SQLite database with all necessary tables, records and indices. Database file must be removed from disk if any error while creating/copying tables, records or indices. Other application or other instance of same app must not be able to access

Re: [sqlite] Call sqlite3_reset multiple times

2006-06-25 Thread Kai Wu
Hello, Thanks for your prompt reply! Then, should sqlite3_finalize be called for a sqlite3_stmt pointer before it gets prepared for another sql statement? in another word, can the same sqlite3_stmt pointer get prepared multiple times and executed afterwards without a sqlite3_finalize in between?

Re: [sqlite] Dumping Memory-DB to File

2006-06-25 Thread John Stanton
A very simple way is use an exclusively opened file as a lock. RohitPatel wrote: Hi I need some help on this. I need to create a new SQLite database with all necessary tables, records and indices. Database file must be removed from disk if any error while creating/copying tables, records

[sqlite] Re: Call sqlite3_reset multiple times

2006-06-25 Thread Igor Tandetnik
Kai Wu [EMAIL PROTECTED] wrote: Then, should sqlite3_finalize be called for a sqlite3_stmt pointer before it gets prepared for another sql statement? This question is meaningless. sqlite3_prepare does not take an existing statement handle and modify it - it creates and returns a brand new

[sqlite] newcomer getting started with VB

2006-06-25 Thread Martin Knirsch
Hello out there, I've just started learning how to use sqlite and the com dll on Win XP in a VB Environment with MS Visual Studio 2003. The only Information available to me is the online help coming with the entire EzTools package and the examples as well. As I'm new to .NET programming I'd

[sqlite] problem with creating a table

2006-06-25 Thread Bijan Farhoudi
Hi, I am trying to create table and I would like to name one of the columns order, but pysqlite does not like it. I do not want to have order__ or any thing like that. for example the following command does not work: cur.execute('create table foo(i integer, order integer)') How can I fix this

Re: [sqlite] Sqlite crashes when i imort huge list

2006-06-25 Thread onemind
Thanks guys, Richard: The reason i didn't mention the software is because all guis just create the text commands anyway so they all do the same thing. I doubt it is a problem with the gui i used which was SQLite database browser. Chris: Thanks for that but i dont know how that helps me. Are