Re: [sqlite] store result

2006-01-19 Thread manoj marathayil
ok this i can do, but the problem is i need to select a set of records and i want to manipulate with each record then only i need to delete that record Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 1/19/06, manoj marathayil wrote: > > hi, > is there is any way so that i can store the result > of >

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Chris Schirlinger
We have the same issue, to get around it we fire a thread when the program starts, intelligently "touching" every table that the user is likely to access (As Michael Sizaki already mentioned a select count(last_column) from big_table; will do it) Since a user is very unlikely to run a program

Re: [sqlite] Fwd: Question about string concatenation

2006-01-19 Thread Gerry Snyder
malcom wrote: Hello, Anyone can translate this SQL query to sqlite? I know that to concatenate two string you should to use || but I can't port this query to sql :( UPDATE table_name SET column = CONCAT(column, " other text to add") WHERE confront_column_key = "something_key" Thanks

[sqlite] Re: Question about string concatenation

2006-01-19 Thread Igor Tandetnik
malcom wrote: Anyone can translate this SQL query to sqlite? I know that to concatenate two string you should to use || but I can't port this query to sql :( UPDATE table_name SET column = CONCAT(column, " other text to add") WHERE confront_column_key = "something_key" UPDATE

[sqlite] Fwd: Question about string concatenation

2006-01-19 Thread malcom
Hello, Anyone can translate this SQL query to sqlite? I know that to concatenate two string you should to use || but I can't port this query to sql :( UPDATE table_name SET column = CONCAT(column, " other text to add") WHERE confront_column_key = "something_key" Thanks

Re: [sqlite] Problem with import

2006-01-19 Thread Chris Schirlinger
I created your schema and saved the single line you provided to a file and it all imported fine: sqlite> .nullvalue NULL sqlite> .separator ; sqlite> .import text.txt Cliente sqlite> select * from cliente; 1|2005-02-13 00:00:00|FRANCISCO EDNAN SABOIA PONTES |0|R|NEWTON PARENTE|1161|PRO XIMO AO

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Eric Bohlman
Geoff Simonds wrote: The app is running on Windows XP machines Is it possible that indexing services are enabled and XP is trying to index the database file?

Re: [sqlite] Decimal conversion

2006-01-19 Thread Dennis Cote
nbiggs wrote: When I try executing the command I get 'SQL error: near "as": syntax error'. Let me explain what I am trying to do, there might be a better way to do it. I have a table of weights as one of the columns. I am trying to return data so that I can create a histogram of the data. My

Re[2]: [sqlite] Slow query after reboot

2006-01-19 Thread Teg
Hello Clark, I don't use a virus scanner and observe the same slow initial performance. I do believe it's possible it's the disk cache though, my disks are quite fast (15K SCSI). It acts more like some initialization phase in the DB than it does disk IO delay. C Thursday, January 19, 2006,

RE: [sqlite] Decimal conversion

2006-01-19 Thread nbiggs
When I try executing the command I get 'SQL error: near "as": syntax error'. Let me explain what I am trying to do, there might be a better way to do it. I have a table of weights as one of the columns. I am trying to return data so that I can create a histogram of the data. My query is as

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Clark Christensen
Also possible, maybe even likely, is the user's anti-virus software is scanning the DB file when the app is first opened. 35MB is a big file for A-V to have to scan. You or they may be able to configure the A-V to ignore the DB file. -Clark - Original Message From: Geoff Simonds

Re: [sqlite] Decimal conversion

2006-01-19 Thread Dennis Cote
nbiggs wrote: How do I convert the number 49.991 to just 49.9 in a select statement? Using the round(weight, 1) returns 50.0. Is there a truncate function? Nathan, You can use: select cast ((field * 10) as integer) / 10.0 If this is something you do a lot of it might make sense to

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Geoff Simonds
Thanks for the info and suggestions Michael. I will give this a try. Michael Sizaki wrote: Geoff Simonds wrote: My table contains about 500,000 rows and 4 columns, not all that much data. The overall size of the db file is 35 mb. Does 15 - 20 seconds sound right to load from disk into

Re: [sqlite] Problem with import

2006-01-19 Thread Dennis Cote
Daniel de Matos Alves wrote: PLEASE, read my e-mail, i really need help ;-) I am trying to import data from a file using sqlite3 command line, and the tcl bind. But I aways get error about the Number of Columns. Sqlite always says that I am trying to put less columns than the number of

Re: [sqlite] Re: store result

2006-01-19 Thread Dennis Cote
Igor Tandetnik wrote: Dennis Cote wrote: But I have to wonder why you suggest creating the temp table at all when this does the same thing: delete from source_table where id in (select id from source_table where some_condition = true); Or even delete from source_table where

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Michael Sizaki
Geoff Simonds wrote: My table contains about 500,000 rows and 4 columns, not all that much data. The overall size of the db file is 35 mb. Does 15 - 20 seconds sound right to load from disk into memory? Yes it does. The problem is, that your query is probably not reading sequentially from

[sqlite] Decimal conversion

2006-01-19 Thread nbiggs
How do I convert the number 49.991 to just 49.9 in a select statement? Using the round(weight, 1) returns 50.0. Is there a truncate function? Nathan Biggs

[sqlite] SQLITE Wrappers

2006-01-19 Thread nbiggs
Hello, I have created some wrappers to call the sqlite3.dll. I just wanted to make sure that I have all the wrappers I need to use sqlite. It is working, I just wanted to make sure that I am making all the calls in the correct order. To Open: sqlite3_open To Execute: sqlite3_prepare

[sqlite] Problem with import

2006-01-19 Thread Daniel de Matos Alves
PLEASE, read my e-mail, i really need help ;-) I am trying to import data from a file using sqlite3 command line, and the tcl bind. But I aways get error about the Number of Columns. Sqlite always says that I am trying to put less columns than the number of columns defined in the table.

Re: [sqlite] store result

2006-01-19 Thread Jay Sprenkle
> I don't believe there is an option to "select into" in SQLite. So your > first statement should probably be a "create as". Also, you should > delete the temp table after the delete. Your solution should read like this: Oops! Too many database syntax records in my head at the same time! > >

[sqlite] Re: store result

2006-01-19 Thread Igor Tandetnik
Dennis Cote wrote: But I have to wonder why you suggest creating the temp table at all when this does the same thing: delete from source_table where id in (select id from source_table where some_condition = true); Or even delete from source_table where some_condition = true;

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Robert Simpson
- Original Message - From: "Geoff Simonds" <[EMAIL PROTECTED]> My table contains about 500,000 rows and 4 columns, not all that much data. The overall size of the db file is 35 mb. Does 15 - 20 seconds sound right to load from disk into memory? I can't tell you that until the

Re: [sqlite] store result

2006-01-19 Thread Dennis Cote
Jay Sprenkle wrote: is there is any way so that i can store the result of a select query and execute a delete query on the same table with out using any other buffer? How about: select id into temp_table from source_table where somecondition = true; delete from source_table where id

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Geoff Simonds
My table contains about 500,000 rows and 4 columns, not all that much data. The overall size of the db file is 35 mb. Does 15 - 20 seconds sound right to load from disk into memory? Robert Simpson wrote: - Original Message - From: "Geoff Simonds" <[EMAIL PROTECTED]> The app is

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Robert Simpson
- Original Message - From: "Geoff Simonds" <[EMAIL PROTECTED]> The app is running on Windows XP machines and I assume that disk files are cached. The strange thing is that the time it takes for the initial read into RAM after install and first use is significantly shorter than

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Geoff Simonds
The app is running on Windows XP machines and I assume that disk files are cached. The strange thing is that the time it takes for the initial read into RAM after install and first use is significantly shorter than after a reboot. For example, if you just installed the app and start it, the

Re: [sqlite] Slow query after reboot

2006-01-19 Thread Jay Sprenkle
On 1/19/06, Geoff Simonds <[EMAIL PROTECTED]> wrote: > I have created a client application that is always running on a users > desktop. The application accepts user input and then uses SQLite to > perform a few simple queries against a single db file that contains 4 > tables. The performance is

Re: [sqlite] store result

2006-01-19 Thread Jay Sprenkle
On 1/19/06, manoj marathayil <[EMAIL PROTECTED]> wrote: > > hi, > is there is any way so that i can store the result > of > a select query and execute a delete query on the > same > table with out using any other buffer? How about: select id into temp_table from source_table where

[sqlite] Slow query after reboot

2006-01-19 Thread Geoff Simonds
I have created a client application that is always running on a users desktop. The application accepts user input and then uses SQLite to perform a few simple queries against a single db file that contains 4 tables. The performance is fantastic after the initial install and normal usage. When the

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Gerhard Häring
Nilo Paim wrote: My point is: if I use another sql engine that is written in Java then I just inverted the problem: how to access the databases without writing a bridge in native code that allows me to access the database from C or C++ or... ? Use a database server with client interfaces

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Ulrik Petersen
Jonathan Ballet wrote: Noel Frankinet wrote: Nilo Paim wrote: Hi Noel, Maybe slower, maybe memory hungry... but not less portable in my opinion. Java is machine independent, unless when using native code. On that scenario ( native code ) Java is not portable. My point is: I would

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Noel Frankinet
Kervin L. Pierre wrote: Cloudscape, which was given to Apache foundation and is now the Apache Derby Project. http://db.apache.org/derby/ Yes this is it ! -- Noël Frankinet Gistek Software SA http://www.gistek.net

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Kervin L. Pierre
Cloudscape, which was given to Apache foundation and is now the Apache Derby Project. http://db.apache.org/derby/ Jonathan Ballet wrote: I think you're talking of http://hsqldb.org/, used among other project by OpenOffice ...

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Nilo Paim
Noel Frankinet wrote: Nilo Paim wrote: Hi Noel, Maybe slower, maybe memory hungry... but not less portable in my opinion. Java is machine independent, unless when using native code. On that scenario ( native code ) Java is not portable. My point is: I would like to have access to

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Ran
If I am not mistaken, the following thread might be relevant: http://www.mail-archive.com/sqlite-users@sqlite.org/msg11005.html Ran On 1/19/06, Nilo Paim <[EMAIL PROTECTED]> wrote: > > Hi all, > > Does anybody here knows something about a port of sqlite to java? > > Please, note that I'm not

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Jonathan Ballet
Noel Frankinet wrote: > Nilo Paim wrote: > >>> >> Hi Noel, >> >> Maybe slower, maybe memory hungry... but not less portable in my >> opinion. Java is machine independent, unless when using native code. >> On that scenario ( native code ) Java is not portable. >> >> My point is: I would like to

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Noel Frankinet
Nilo Paim wrote: Hi Noel, Maybe slower, maybe memory hungry... but not less portable in my opinion. Java is machine independent, unless when using native code. On that scenario ( native code ) Java is not portable. My point is: I would like to have access to sqlite databases from java

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Nilo Paim
Noel Frankinet wrote: Nilo Paim wrote: Hi all, Does anybody here knows something about a port of sqlite to java? Please, note that I'm not talking about java calling sqlite via JNI, but about a real rewrite of sqlite using java. Obviously, a second step would be the writing of a JDBC

Re: [sqlite] Sqlite and Java

2006-01-19 Thread Noel Frankinet
Nilo Paim wrote: Hi all, Does anybody here knows something about a port of sqlite to java? Please, note that I'm not talking about java calling sqlite via JNI, but about a real rewrite of sqlite using java. Obviously, a second step would be the writing of a JDBC driver. Would be useful that

[sqlite] Sqlite and Java

2006-01-19 Thread Nilo Paim
Hi all, Does anybody here knows something about a port of sqlite to java? Please, note that I'm not talking about java calling sqlite via JNI, but about a real rewrite of sqlite using java. Obviously, a second step would be the writing of a JDBC driver. Would be useful that port? Comments?

[sqlite] store result

2006-01-19 Thread manoj marathayil
hi, is there is any way so that i can store the result of a select query and execute a delete query on the same table with out using any other buffer? T h a n k s & R e g a r d s , Manoj M | Webyog | Bangalore | Voice: 91 9886171984, 91 80 51216434(off) "A winner is not one who never fails,

[sqlite] problem porting to arm/embos

2006-01-19 Thread imoht
hi, after porting sqlite3 to arm9/embos i seem to have problems with sqlparsing. for example trying to create a simple table with sql using CREATE TABLE test(id integer); returns a sqliteErr "near "id": syntax error" - i already stepped through the whole parsing but didnt get it. maybe