I have read that SQLite doesn't suport well multithreading...
I have the following problem and wonder if anyone could provide me some
guidance.
I have a GUI application using SQLite to store its data.
I have a 'Search' panel. Performing a search (scan of the database) in the
background.
And
let's say I have a table
like that
CREATE TABLE Infos
{
id INTEGER,
text TEXT
}
and I want to search a with the word... 'apple', 'cinamon', 'cake'
I could write
SELECT FROM infos WHERE text LIKE '*apple*' AND text LIKE '*cinamon*' AND text
LIKE '*cake*'
Now, isn't there a way to
thanks all!
- Original Message -
From: Puneet Kishor [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Sunday, June 26, 2005 9:21 AM
Subject: Re: [sqlite] about text search
On Jun 25, 2005, at 6:05 PM, Lloyd Dupont wrote:
let's say I have a table
like that
CREATE TABLE Infos
in the application I'm writting I would make intensive use of BLOB
in fact I have a very simple DB tables.
However most of them have a BLOB column where I would put application defined
data.
The data could easily be over 50K (in fact it would be an in memory .tgz
archive with user text and
I have 2 related table:
CREATE TABLE Ingredients(
ID INTEGER PRIMARY KEY,
name TEXT,
description BLOB,
property_ID INTEGER
);
CREATE TABLE Properties(
ID INTEGER PRIMARY KEY,
price double
);
When I create a new Ingredient I would like to create a new property for this
BTW, one more question / precision.
in INSERT INTO Properties() I didn't pass the value for ID.
because basically I want an auto-incremented value which I don't have to
worry about.
maybe that's not the way to use such value ?!
- Original Message -
From: Lloyd Dupont [EMAIL
thanks Martin it worked!
although I replaced your (SELECT MAX(ID) FROM Properties) by ROWID.
is it sound?
like that:
CREATE TRIGGER create_ingredient_property AFTER INSERT ON Ingredients
BEGIN
INSERT INTO Properties (price) VALUES (NULL);
UPDATE Ingredients
SET property_ID = ROWID
Thanks for that!
last_insert_rowid() function:
anyway, I hadn't tested the code. I mean the CREATE TRIGGER succeed.
But I didn't check if the trigger itself works well.
Now I did and have a problem...
It don't work!
I get: SQLite Error 1 - no such column: OLD.ID
this is my setting:
CREATE
Sorry, stupit mistak, I have to use NEW and not OLD in case of an INSERT
trigger!
Thanks all it works like a breeze!
- Original Message -
From: Lloyd Dupont [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Thursday, June 09, 2005 12:26 AM
Subject: Re: [sqlite] SQL question
Thanks
a question about sqlite3.exe
reading some documentation aboit it I see you could have memory database.
how do I create them?
or attach them?
Dennis, syntax error somewhere.
'group by minute union select 0, 0 where not exists (select * from
event_data)'
Lloyd
- Original Message -
From: Dennis Cote [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Thursday, February 24, 2005 1:31 AM
Subject: Re: [sqlite] tricky date time
The result I get is
0|15
I was expecting 60 result rows
any Ideas? Is this a version 3 operator only?
- Original Message -
From: Lloyd Thomas [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Tuesday, February 22, 2005 11:41 PM
Subject: Re: [sqlite] tricky date time problem
Thanks Jay
in the event_data table. Not much luck though.
- Original Message -
From: D. Richard Hipp [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Wednesday, February 23, 2005 12:26 PM
Subject: Re: [sqlite] tricky date time problem
On Mon, 2005-02-21 at 21:49 +, Lloyd Thomas wrote:
I have a query which
indicate where I am going wrong.
Lloud
- Original Message -
From: Jay [EMAIL PROTECTED]
To: sqlite-users@sqlite.org; [EMAIL PROTECTED]
Sent: Wednesday, February 23, 2005 5:39 PM
Subject: Re: [sqlite] tricky date time problem
--- Lloyd Thomas [EMAIL PROTECTED] wrote:
Thanks Jay/DRH
Sent: Wednesday, February 23, 2005 5:41 PM
Subject: Re: [sqlite] tricky date time problem
Lloyd,
I messed up the math for the end minute calculation. :-[
The correct query is given below. Adding 59 was intended to round the
result of an integer division (which drops the remainder), but I'm
Dennis,
Thanks for you help so far. I think it is easier for PHP to select
the MAX event. The problem I now have is if there is no records for an hour,
PHP will through up an error because MAX must have at least one record to
process, even if it is 0.
Thanks again
- Original Message
problem
--- Lloyd Thomas [EMAIL PROTECTED] wrote:
I have a query which calculates the number of events during an hour
by the
minute. It needs to work out which minute has the most events and
the
average events during that hour. So it should return an array of 60
results
for an hour where I can use
'
Would this be the best way to do this query?
I apologise for my bad SQL syntax in advance as I am not great at it, a
symptom of knowing a little of a lot and lot of little.
Lloyd
- Original Message -
From: Jay [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Tuesday, February 22
) =
event_time)
Can some one help?
Lloyd
('2004-04-07 10:00:00','+1 minutes') and datetime ('2004-04-07
10:59:59','+1 minutes');
returns nothing.
Am I using the right datetime modifiers?
- Original Message -
From: Lloyd Thomas [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Monday, February 21, 2005 9:49 PM
Subject: [sqlite
Thanks Dennis.
As long as I know where I stand. I can probably use PHP or Delphi to
update each row manually.
Lloyd
- Original Message -
From: Dennis Cote [EMAIL PROTECTED]
To: sqlite-users sqlite-users@sqlite.org
Sent: Wednesday, January 12, 2005 4:21 PM
Subject: Fw: [sqlite] add
Hi Dennis,
I tried something similar to your recommendation, but there was
a problem with the following
INSERT INTO call_data
SELECT old_call_data.*, firstname || ' ' || surname
FROM old_call_data JOIN users USING extn_no;
there is a syntax error near extn_no.
Lloyd
- Original
UPDATES with SUB SELECTS. What is
the URL?Lloyd- Original Message -
From: Bert Verhees [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Tuesday, January 11, 2005 7:55 AM
Subject: Re: [sqlite] add new column to table
Op maandag 10 januari 2005 23:56, schreef Lloyd Thomas:
Thanks
regarding UPDATES with SUB SELECTS. What is
the URL?
Lloyd
- Original Message -
From: Bert Verhees [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Tuesday, January 11, 2005 7:55 AM
Subject: Re: [sqlite] add new column to table
Op maandag 10 januari 2005 23:56, schreef Lloyd Thomas
I wish to create a new column in a table and add data, which is queried from
another table.What is the best way?
Lloyd
another table.
Lloyd
- Original Message -
From: Paul Dixon [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Monday, January 10, 2005 5:50 PM
Subject: Re: [sqlite] add new column to table
Lloyd Thomas wrote:
I wish to create a new column in a table and add data, which is queried
from
extn_no FROM call_data));
I have missed something?
- Original Message -
From: Lloyd Thomas [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Monday, January 10, 2005 9:08 PM
Subject: Re: [sqlite] add new column to table
Thanks Paul,
I have used that example before
Hi, I am having a problem with the following query. It seems to force php to
timeout after 30secs. The query goes through 150K records. Is there anything I
can do to speed it up?
code-
SELECT call_id, C.extn_no AS extn_no, dest, dest_name, call_time,
Hi, I am having a problem with the following query. It seems to force php to
timeout after 30secs. The query goes through 150K records. Is there anything I
can do to speed it up?
code-
SELECT call_id, C.extn_no AS extn_no, dest, dest_name, call_time,
I have been using SQLite successfully for quite some time. I recently
installed it on a friends server in order to use it there.
While I am able to access the db file just fine when I run my perl script from
the shell prompt I get the following error when trying to run it from a cgi-bin.
to open database
Steven Lloyd said:
I have been using SQLite successfully for quite some time. I recently
installed it on a friends server in order to use it there.
While I am able to access the db file just fine when I run my perl script
from the shell prompt I get the following error when trying
:49 AM
Subject: Re: [sqlite] unable to open database
--- Steven Lloyd [EMAIL PROTECTED] wrote:
I have been using SQLite successfully for quite some
time. I recently installed it on a friends server in
order to use it there.
While I am able to access the db file just fine when I
run my perl script
I am have a problem with a query which may well have over 200,000 records. I
have building a website using PHP and PHP is timing out after 30secs due the
the size of the call_data table (I think). Is there anyway I can improve the
following query so that it is faster. I think I am using sqlite
Forgive my ignorance, I have yet to use a transaction and therefore can you
give me an example.
Lloyd
- Original Message -
From: Christian Smith [EMAIL PROTECTED]
To: Lloyd thomas [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 3:27 PM
Subject: Re: [sqlite
Which is the best way to backup rows which meet a certain date criteria?
ie WHERE data is = '2003-11-20'.
Would I need to select and save the data to a temporary table and then DUMP the temp
table.
Ok,
I just tried the query using the sqlite command tool 2.8.12 and I
get no results, whereas if I use PHP5 with sqlite 2.8.11 I get the expected
results.
Can some one tell me why this is or what I am doing wrong?
- Original Message -
I have a query which successfully runs on
Thanks Ken,
You make it look so simple.
Lloyd
- Original Message -
From: Williams, Kenneth (Ken) (TLR Corp) [EMAIL PROTECTED]
To: Lloyd thomas [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 3:50 PM
Subject: RE: [sqlite] user id select
Thanks Kurt,
The GUI I was using to run the query seems to be using
an old version of the SQLite DLL. I haved tried another one and the query
has got me closer to what I want.
The problem I now have is that I am getting too many results.
ie.
SELECT areacode FROM stdcodes WHERE
I think I have sussed it. If you can see something wrong with the follwing
let me know.
code-
SELECT MAX(areacode) AS areacode FROM stdcodes WHERE '0018764582' LIKE
areacode || '%';
---
Thanks Kurt,
I think I have sussed it.
Well not quite!!
If I extend the 'select' parameter to include other columns, there are
instances where the results in those columns may not be related to what is
in the left columns (as I would expect) and if you group the results, you
end up with more than one
Thanks.
Lloyd
- Original Message -
From: Kurt Welgehausen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 11, 2004 4:58 PM
Subject: Re: [sqlite] Matching telephone strings
..., but is it correct?
No, very dangerous. You're depending on the values of band
I have a table with user id's and another with user id's linked to a group.
users table
|user_id| username |
|1 | Lloyd Thomas|
| 2| John Smith |
Group table
|group id| user_id|
| 1 | 1 |
I am trying to create a query which selects a user where
'or G.group_id is null;
- Original Message -
From: Christian Smith [EMAIL PROTECTED]
To: Lloyd thomas [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, April 11, 2004 9:34 PM
Subject: Re: [sqlite] user id select
On Sun, 11 Apr
I tried the follwing with no results:
select areacode from stdcodes where '01865323260' like areacode || '%'
if I do:
select areacode from stdcodes where '01865' like areacode
that works OK, but that is more or less the same as what I do already.
Am I missing something?
- Original
Please ignore this question. I have already work it out ages ago, but had
forgotten.
- Original Message -
From: Lloyd thomas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 03, 2004 12:59 PM
Subject: [sqlite] DATE_SUB
Hi All,
I am still not quite getting my head
SELECT TIME_TO_SEC(duration)as duration
FROM call_data where call_time = '2003-12-04 16:41'
AND DATE_SUB('2003-12-04 16:41', INTERVAL duration HOUR_SECOND) = call_time
---
Lloyd
I have a table that shows a list of connections showing the time the
connection was finished and the duration.
I wish to show concurrent connections during a particular minute.
for instance the following would show that there was two connections during
2003-12-04 09:27:00
('2003-12-03 18:42') - julianday(duration)) =
julianday(call_time)
---
Lloyd
- Original Message -
From: Lloyd thomas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, February 28, 2004 10:28 PM
Subject: Re: [sqlite] time calculations
I
Thank you DRH,
I did manage to sort out my problem with the help
from another member. The functions you are adding I'm sure will be
appreciated. Will there be a simple way to update SQLite in PHP on a windows
platform so that I can use the new date/time functions?
Lloyd
101 - 149 of 149 matches
Mail list logo