RE: [sqlite] Search on Age, from DOB column

2007-05-03 Thread Allan, Mark
Thanks to everybody that contirbuted to this thread. I have now implemented this functionality and it works well. DISCLAIMER: This information and any attachments contained in this email message is intended only for the use of the individual or entity to which it is addressed and may contain

[sqlite] Search on Age, from DOB column

2007-05-03 Thread Allan, Mark
Hi, I need to be able offer the user the ability to search for patients in the database based on age. i.e. age > 17 or age = 45 etc etc... I only store the patient DOB in the database however, what is the SQL to achive this? Can I subract todays date from the DOB and get the number of years

RE: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread Allan, Mark
> > Ok, so here's another question, how would I get the count of > patients where the EVC and FVC > 2.0? > Dont worry I have figured this out. I am doing:- select count (distinct p.PatientID) p.* from PatientsTable as p join ExaminationsTable as e on e.PatientID=p.ID join TestTable as t on

RE: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread Allan, Mark
> Allan, Mark wrote: > > What I want is Joe Blogs just the once. > > > > > Mark, > > Then try adding distinct like this: > > select distinct p.* > from PatientsTable as p > join ExaminationsTable as e on e.PatientID=p.ID > join TestTable as t

RE: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread Allan, Mark
g > Subject: Re: [sqlite] SQL query help (mutiple joins) > > > On 5/1/07, Allan, Mark <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Thanks for your quick replies. I have tried this method but > however I am getting a row returned for each entry in > Forc

RE: [sqlite] SQL query help (mutiple joins)

2007-05-01 Thread Allan, Mark
-Original Message- > From: Dennis Cote [mailto:[EMAIL PROTECTED] > Sent: 01 May 2007 15:31 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] SQL query help (mutiple joins) > > > Allan, Mark wrote: > > I have a database that looks something like the following

[sqlite] SQL query help (mutiple joins)

2007-05-01 Thread Allan, Mark
Hi, Can anyone offer any help with the following SQL query? I have a database that looks something like the following:- PatientsTable { ID, Name, Sex, } ExaminationsTable { ID, PatientID, } TestTable { ID, ExamID, .} ForcedSpiroTable { ID, TestID, EVC, IVC, IC ... }

RE: [sqlite] Japanese-Korean characters

2007-04-25 Thread Allan, Mark
I think what he is trying to say is that you can store Japanese/Korean characters in your database using a UTF-8 or Unicode string. We currently use Sqlite and support Chinese, and plan to implement Japanese and Korean and have had no problems. We store the text as a UTF-8 encoded string.

RE: [sqlite] journal - "Unable to open the database file"

2007-03-12 Thread Allan, Mark
ginal Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 09 March 2007 16:36 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] journal - "Unable to open the database file" > > > "Allan, Mark" <[EMAIL PROTECTED]> wrote: >

RE: [sqlite] journal - "Unable to open the database file"

2007-03-09 Thread Allan, Mark
m if you have the > extension .db for the > database file and I think if you change that to something > like .db3 then it > won't happen. > > RBS > > -Original Message- > From: Allan, Mark [mailto:[EMAIL PROTECTED] > Sent: 09 March 2007 16:23 > To: sqlite-users@sq

[sqlite] journal - "Unable to open the database file"

2007-03-09 Thread Allan, Mark
I have been using SQLite as a replacement for MS Access for use in a PC application. It works well but we have been experiencing the following problem when the database file is located on a network drive. We are getting "Unable to open the database file" when trying to start a new transaction.

[sqlite] SQLite db lock problem

2007-02-19 Thread Allan, Mark
Hi, A little while back I submitted a query as to whether SQLite would be a good alternative to using MS Access as an internal database for a PC application. I received many repiles for which I was grateful. Mostly people thought that SQLite was a far more superior option to Access, the main

RE: [sqlite] SQL query - TOP

2007-02-16 Thread Allan, Mark
Thanks Donald Griggs and Igor Tandetnik, I have indeed 'taken it to the limit' and it works ok, and I can't believe how quick it works. Thanks > -Original Message- > From: Griggs, Donald [mailto:[EMAIL PROTECTED] > Sent: 16 February 2007 17:49 > To: sqlite-users@sqlite.org > Subject:

[sqlite] SQL query - TOP

2007-02-16 Thread Allan, Mark
Hi, I have an SQL question. The following syntax is used in a MSDN example for retrieving a certain range of records from a table, so that data can be loaded into a DataGridView as a when is is needed for performance reasons:- Select Top * From PATIENTS WHERE PATIENT_PK NOT IN (SELECT TOP

RE: [sqlite] SQLite on RAM

2006-10-10 Thread Allan, Mark
Believe so, in this case you would use an 'in memory' database. This can be opened by giving the filename ":memory:". There is more information on the wesite and in the mail archive on this. Personally I have never used this feature, so cant really offer more help than that. > -Original

[sqlite] SQLite vs MS Access

2006-09-06 Thread Allan, Mark
Hi, After successfully using SQLite on an embedded device, we are now thinking of using SQLite in a PC application. This would be used in place of an MS Access database on a local/network disk. I believe that SQLite should be quicker for both transactions and queries than Access. The one draw

RE: [sqlite] Using sqlite on Nintendo DS / PSP

2006-07-06 Thread Allan, Mark
> I'm building a dictionary application that will run on > Nintendo DS and PSP. > I'm considering using sqlite to store the database which will will be > read-only, and embedded on rom. > > Is it possible to get sqlite to read the database directly from such a > pre-allocated memory area? Usage

RE: [sqlite] sqlite too slow for me?

2006-06-29 Thread Allan, Mark
I believe that when using a transaction, i.e. Begin, Commit. SQLite will only perform the actual writing to file when Commit is made, therefore less disk I/O, or all I/O done at the end rather than after each insert and therefore better performance. See documentation at:-

RE: [sqlite] disabling rollback journal

2006-06-07 Thread Allan, Mark
> I have been in contact with the developer of your flash filesystem > and we are working on a solution now... That really is excellent news. Thanks for your interest and effort. I look forward to the solution. DISCLAIMER: This information and any attachments contained in this email message

RE: [sqlite] disabling rollback journal

2006-06-07 Thread Allan, Mark
14:14 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] disabling rollback journal > > > "Allan, Mark" <[EMAIL PROTECTED]> wrote: > > > > our flash file system is 100% power-fail proof and thus the > > journalling of the database for us is not

[sqlite] disabling rollback journal

2006-06-07 Thread Allan, Mark
All, I have already posted some messages some months ago concerning disabling the creation of the journal file. It seems that currently there is no way to configure SQLite to do this. Journalling, it seems, is an integral part of the paging layer, is this correct? My question is thus, has

RE: [sqlite] C++ Arrays in sqlite

2006-05-16 Thread Allan, Mark
Jay is correct here, only use a blob if you do not want to search on that field. Your example may not be best suited to BLOB but that is for you to decide. We store medical test data as a blob. This is not much more complicated than an array of C structs. However we have a primary key field, a

RE: [sqlite] C++ Arrays in sqlite

2006-05-15 Thread Allan, Mark
Indeed storing the array as a BLOB is the best way to store this. To store a blob you will need to use the following syntax I believe:- INSERT INTO (NAME, NUMBERS) VALUES (,?) And will need to bind the array to the SQL query after using sqlite3_bind_blob(). There is documentation on this on

RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
ndication > > > On 5/10/06, Allan, Mark <[EMAIL PROTECTED]> wrote: > > Jay, > > > > Yes there is a index on the date column. The delete > operation is on date, specifically dates older than a date > entered by the user (so he/she can clear out old reco

RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
the time. Mark > -Original Message- > From: Jay Sprenkle [mailto:[EMAIL PROTECTED] > Sent: 10 May 2006 14:10 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] accurate progress indication > > > On 5/10/06, Allan, Mark <[EMAIL PROTECTED]> wrote: > > &

RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
All, I have implemented the method suggested and it works well for me. I am running on an embedded device and the general performance we get using SQlite is not great. Additionally the database is not that large compared to some of the other users' needs. Our database can only ever be a

[sqlite] accurate progress indication

2006-05-09 Thread Allan, Mark
Hi, We would like to be able to show a (reasonably) accurate progress bar when we are deleting a large number of records from our database. Is there a way in which this can be done. We are using SQLite version 3.2.7. I have had a look at the sqlite3_progress_handler() API function but it

RE: [sqlite] Vacuum slow

2006-03-02 Thread Allan, Mark
> But I wonder : > > if I have a db ~ 1gb and I delete all the data in the tables ( db is > than nearly empty ) > Issuing a vacuum command takes a long time ( several minutes ). > Why ? > Is there a way to "vacuum" faster ? We found that vacuuming the database was also slow. We no longer vaccum

RE: [sqlite] disabling journalling of the database - side affects?

2005-11-01 Thread Allan, Mark
not supposed to be happening. Regards Mark > -Original Message- > From: Gerry Snyder [mailto:[EMAIL PROTECTED] > Sent: 01 November 2005 14:58 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] disabling journalling of the database - side > affects? > &

RE: [sqlite] disabling journalling of the database - side affects?

2005-11-01 Thread Allan, Mark
[mailto:[EMAIL PROTECTED] > Sent: 01 November 2005 11:49 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] disabling journalling of the database - side > affects? > > > "Allan, Mark" <[EMAIL PROTECTED]> wrote: > > I definately have a problem when I disable

RE: [sqlite] disabling journalling of the database - side affects?

2005-11-01 Thread Allan, Mark
age- > From: Allan, Mark [mailto:[EMAIL PROTECTED] > Sent: 01 November 2005 09:52 > To: sqlite-users@sqlite.org > Subject: [sqlite] disabling journalling of the database - > side affects? > > > > Can anybody tell me if I will suffer any sideaffects if I > disable the

[sqlite] disabling journalling of the database - side affects?

2005-11-01 Thread Allan, Mark
Can anybody tell me if I will suffer any sideaffects if I disable the journalling of the database file with version 3.2.7? We have changed the SQlite code locally to omit the journalling of the database file by supplying 1 as the value for omitJournal to calls to the function

RE: [sqlite] Very Slow delete times on larger databases, please help!

2005-10-27 Thread Allan, Mark
uuming > takes incredibly > > long? > > > > > > On 10/21/05, Allan, Mark <[EMAIL PROTECTED]> wrote: > > > > > > > > > Thanks to both Christian Smith and John Stanton for your posts. > > > > > > > On Wed, 19 Oct 200

RE: [sqlite] Optimal page size

2005-10-25 Thread Allan, Mark
There doesn't appear to be any real documentation over what page size to use. I think it is more of a case of experimenting and determining which is best for your system/application. In the archive I found an article stating that for optimum performance on Win32 to match the page size with

RE: [sqlite] Very Slow delete times on larger databases, please help!

2005-10-21 Thread Allan, Mark
Thanks to both Christian Smith and John Stanton for your posts. > On Wed, 19 Oct 2005, Christian Smith wrote: > From the VDBE output you originally posted, you are doing a > fair amount of > work for each deleted row: > - Index search to find the next row from EXAMINATIONS to delete > -

RE: [sqlite] Very Slow delete times on larger databases, please help!

2005-10-19 Thread Allan, Mark
nal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 18 October 2005 19:06 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Very Slow delete times on larger databases, please help! "Allan, Mark" <[EMAIL PROTECTED]> wrote: > Have you been able to investig

RE: [sqlite] Very Slow delete times on larger databases, please help!

2005-10-18 Thread Allan, Mark
@sqlite.org Subject: Re: [sqlite] Very Slow delete times on larger databases, please help! "Allan, Mark" <[EMAIL PROTECTED]> wrote: > We are experiencing incredibly slow delete times when deleting a > large number of rows:- > > We are using SQLite on an embdedded platform with