Re: [sqlite] Updating only the last raw

2008-10-17 Thread Dan
On Oct 17, 2008, at 1:43 PM, Lloyd wrote: > Hi, > > Lets assume a table having following data > > No. NameAddress > > 1 A addrA > 2 B addrB > 3 C addrC > 4 B addrB1 > > I want to update the filed 'Address' based on field

Re: [sqlite] Updating only the last raw

2008-10-17 Thread Lloyd
Thank you very much Dan. On Fri, 2008-10-17 at 14:10 +0700, Dan wrote: > On Oct 17, 2008, at 1:43 PM, Lloyd wrote: > > > Hi, > > > > Lets assume a table having following data > > > > No. NameAddress > > > > 1 A addrA > > 2 B addrB > > 3 C

Re: [sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-17 Thread MikeW
John Belli <[EMAIL PROTECTED]> writes: > > On Thu, 16 Oct 2008 17:54:52 + (UTC), MikeW > <[EMAIL PROTECTED]> wrote: > > >My code has two pre-opened DB connection handles, and would like to > >perform an SQL operation over the two databases. > >The DB filenames are not available at this

Re: [sqlite] How to speed up read-only databases?

2008-10-17 Thread MikeW
Christophe Leske <[EMAIL PROTECTED]> writes: > > Hi there, > > i am using a 120MB database in an embedded project (a DVD-ROM project) > and was wondering what I can do to speed up its reading using diverse > PRAGMA statements. > The database is locked, meaning that no data is being inserted

Re: [sqlite] Tcl/SQLite application best practices ???

2008-10-17 Thread Michael Schlenker
Rob Sciuk schrieb: > Is there an example application which demonstrates good coding technique > for both tcl and sqlite to perform C.R.U.D. type operations?? I'm about > to develop a small proof of concept using tcl/tk and SQLite, and while I > have some ideas about mating the two, I'm sure

Re: [sqlite] How to speed up read-only databases?

2008-10-17 Thread leske
Hello Mike, Did you say that the PRAMGA locking_mode=EXCLUSIVE was set ? The doc suggests this speeds things up ... I have that set, yes. You are not clear about which aspect is slow - are you already using sqlite3_bind_x() and placeholders (?) in your SQL statements ? Doing a

[sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread [EMAIL PROTECTED]
I have been trying to understand if and how it is it possible for me to install SQLite, but due to my little knowledge I find no way. Also, no information at all is given on the official site, apart from a general "installation is trivial: just copy the sqlite or sqlite.exe executable to the

Re: [sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread Martin.Engelschalk
Hello Luigi sqlite cannot be installed or run, but only compiled and inked into an application. There is no server. See http://www.sqlite.org/about.html Martin [EMAIL PROTECTED] schrieb: > I have been trying to understand if and how it is it possible for me > to install SQLite, but due to my

Re: [sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread [EMAIL PROTECTED]
> only compiled and linked into an application. There is no server. Martin, thank you for the answer. I do not really understand "compiled", "linked into an application" and "there is no server". They are far too technical terms. But, judging from your short answer, I believe that there is no

Re: [sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread MikeW
Martin.Engelschalk <[EMAIL PROTECTED]> writes: > > Hello Luigi > > sqlite cannot be installed or run, but only compiled and inked into an > application. There is no server. > See http://www.sqlite.org/about.html > > Martin There is an executable: http://www.sqlite.org/sqlite.html for manual

Re: [sqlite] How to speed up read-only databases?

2008-10-17 Thread MikeW
<[EMAIL PROTECTED]> writes: > > Hello Mike, > > Did you say that the PRAMGA locking_mode=EXCLUSIVE was set ? > The doc suggests this speeds things up ... > > I have that set, yes. > > You are not clear about which aspect is slow - are you already using > sqlite3_bind_x() and placeholders

[sqlite] Questions about "analyze"

2008-10-17 Thread Fabrizio Carimati
Hi to all, I have a table with many record, that have a field normally with value '0'. Occasionally i update some records by setting the field to '1' to mark it, and after in a background job, i localized them for working on it. For that, i have an index on that field. My problem: if i run an

Re: [sqlite] Questions about "analyze"

2008-10-17 Thread Griggs, Donald
Greetings, Clodo, Regarding: "[is it]possible to force the use of the index?" The very latest release of sqlite, 3.6.4, implements precisely that, in the form of an "INDEXED BY" clause. See: http://www.sqlite.org/releaselog/3_6_4.html Specifically:

Re: [sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread Graeme Pietersz
On Friday 17 October 2008 16:39:32 [EMAIL PROTECTED] wrote: > > only compiled and linked into an application. There is no server. > > Martin, thank you for the answer. > I do not really understand "compiled", "linked into an application" > and "there is no server". Use Google. There are lots of

Re: [sqlite] Updating only the last raw

2008-10-17 Thread Igor Tandetnik
"Lloyd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Lets assume a table having following data > > No. Name Address > > 1 A addrA > 2 B addrB > 3 C addrC > 4 B addrB1 > > I want to update the filed 'Address' based on field 'Name'. But if > there are

[sqlite] Include a double quote inside a string-literal

2008-10-17 Thread Aladdin Lampé
Hi! Is it possible to include a \" (double quote) inside a string-literal? I wanted to use a string-literal like "this is \"not working\"" but sqlite's SQL parser doesn't seem to accept this. Is it the intended behaviour or did I do something wrong? Thanks for your help. Aladdin

Re: [sqlite] How to speed up read-only databases?

2008-10-17 Thread Christophe Leske
> When you say 'sqlite.exe' I presume you are referring to 'sqlite3.exe' ? > (http://www.sqlite.org/sqlite.html) > Yes. And I am using v3.6.4. > Using the correct INDEX can speed queries up vastly, so if you can > identify how you are accessing the data, and then set that/those > columns as

Re: [sqlite] Tcl/SQLite application best practices ???

2008-10-17 Thread Rob Sciuk
On Fri, 17 Oct 2008, Michael Schlenker wrote: > It depends a bit on what you try to write and what other constraints you > have or are ok to accept. > > Michael Danke Michael. Yes, I see what you mean. My intent was of course to mate a generic procedural tcl with sqlite, and add a rich data

Re: [sqlite] Questions about "analyze"

2008-10-17 Thread Paul Smith
Clodo wrote: > Many thanks, it's a good news that resolve my problem. > > But still remain "a trick", i think the behaviour descripted in my > original feedback is "strange".. i understand, if all fields have the > same value, an index on that have a zero "height" in computing the best >

Re: [sqlite] How to install SQLite on a shared linux hosting

2008-10-17 Thread Enrique Ramirez
I have a similar setup than you (Linux host, I have no control over the system, just the files in my directory) and I have been able to successfully use SQLite with PHP. You can choose to create your databases from within PHP code, or alternatively use a graphical frontend (like for example the

Re: [sqlite] Include a double quote inside a string-literal

2008-10-17 Thread Enrique Ramirez
Did you remember to put single quotes around your string? Your example shows double quotes: "this is \"not working\"" vs 'this is \"not working\"' // -- Enrique Ramirez Irizarry Lead Developer Indie Code Labs http://www.indiecodelabs.com On Fri, Oct 17,

[sqlite] FTS3, UPDATE of one column: why are all columns affected?

2008-10-17 Thread yaroslavp
Hi All, I am using an FTS3 virtual table with multiple columns. This works very well, until I try to do an UPDATE on _one_ of the columns in the vtable. In that case, the other columns are cleared. After looking into the FTS3 code, I discovered that the columns in the original SQL statement are

[sqlite] sqlite3_open on non-DB file

2008-10-17 Thread Antoine Caron
Hi guys, 1st I'd like to say I'm pretty new to SQLite, about 1 week. I'm trying to handle correctly the DB opening and here's some question on this. #1 I'm validating the db.sqlite file exist. if it doesn't, it creates it, right ? so right after being created, is the sqlite_master table

Re: [sqlite] sqlite3_open on non-DB file

2008-10-17 Thread Thomas Briggs
I think there are some self-identifying bits at the start of a valid SQLite file... you could open the file directly and check for those. Or, if you're going to retrieve a list of table names from sqlite_master when first opening the database, you could trap the SQLITE_NOTADB when executing

Re: [sqlite] How to speed up read-only databases?

2008-10-17 Thread John Stanton
Prepare your statements only once and then use bind. Do not use sqlite3_exec. Do not open and close the DB for each read, instead open once and let the cache work. Avoid row scans by defining indices. Use the new index selection functionality to force the use of the best index. Place

Re: [sqlite] FTS3, UPDATE of one column: why are all columns affected?

2008-10-17 Thread yaroslavp
This turned out to be a bug in my code. I apologize. Yaroslav -- View this message in context: http://www.nabble.com/FTS3%2C-UPDATE-of-one-column%3A-why-are-all-columns-affected--tp20036520p20039068.html Sent from the SQLite mailing list archive at Nabble.com.

Re: [sqlite] Include a double quote inside a string-literal

2008-10-17 Thread John Stanton
SQL uses single quotes to delimit string literals. Aladdin Lampé wrote: > Hi! > Is it possible to include a \" (double quote) inside a string-literal? > I wanted to use a string-literal like "this is \"not working\"" but sqlite's > SQL parser doesn't seem to accept this. > Is it the intended

[sqlite] Compiling with mingw32/msys on Windows

2008-10-17 Thread John Belli
OK, I should have all the required utils, and configure apparently worked properly, but make barfs (log below): MinGW-5.1.4 MSYS-1.0.10 ActiveTcl8.5.4.0.286921-win32-ix86-threaded (after install, linked bin/tclsh85.exe to tclsh.exe) Any idea? JAB -- John A. Belli Software Engineer Refrigerated

Re: [sqlite] multithreaded query testing results, and a significant windows performance improvement (10x).

2008-10-17 Thread David Clark
I would think maybe one performance demo that could be used from the command line to demonstrate performance and then secondarily show how it is achieved. The TRANSACTIONS did do the trick. I saw 3,000 inserts per second. Could most likely get more performance from it if I want away from

Re: [sqlite] Can you perform an ATTACH-type operation just using DB handles ?

2008-10-17 Thread John Belli
On Fri, 17 Oct 2008 07:53:52 + (UTC), MikeW <[EMAIL PROTECTED]> wrote: >John Belli <[EMAIL PROTECTED]> writes: >> >> On Thu, 16 Oct 2008 17:54:52 + (UTC), MikeW >> <[EMAIL PROTECTED]> wrote: >> >> >My code has two pre-opened DB connection handles, and would like to >> >perform an SQL

[sqlite] Trigger for updating timestamp-field

2008-10-17 Thread Kristofer Hindersson
Hi, I've recently started to play around with SQLite and I'm currently trying to create a trigger for updating a timestamp field inside a table (SQL-syntax for the creation of the table is included below.) Could someone please tell me how I should go about writing such a trigger. I'd like the

Re: [sqlite] Trigger for updating timestamp-field

2008-10-17 Thread P Kishor
On 10/17/08, Kristofer Hindersson <[EMAIL PROTECTED]> wrote: > Hi, > > I've recently started to play around with SQLite and I'm currently trying to > create a trigger for updating a timestamp field inside a table (SQL-syntax > for the creation of the table is included below.) Could someone

Re: [sqlite] Trigger for updating timestamp-field

2008-10-17 Thread Enrique Ramirez
Just in case you also run into this: I had to do this recently on a project of mine and found out that datetime('now') (on Windows) doesn't give me the actual time since it uses UTC. To get the actual local time, use datetime('now','localtime'). For the rest of the date/time documentation, you