[sqlite] Re: Summit a bug : data encoded from UTF8 is incorrect

2006-09-20 Thread Igor Tandetnik
卢炎君 <[EMAIL PROTECTED]> wrote: I use a tool name as sqlitebrowser which from sourceforge to browsed my db , BTW all data be decoded as utf-8 (lanugage is chinese), the result of retrive is correct display, so I am sure that all data has no any problem when be inserted into db. right? for exam

[sqlite] Summit a bug : data encoded from UTF8 is incorrect

2006-09-20 Thread 卢炎君
Hi all I use a tool name as sqlitebrowser which from sourceforge to browsed my db , BTW all data be decoded as utf-8 (lanugage is chinese), the result of retrive is correct display, so I am sure that all data has no any problem when be inserted into db. right? for example, record be stored

Re: [sqlite] how sqlite works?

2006-09-20 Thread John Stanton
I suggest that you get Donald Knuth's books (Fundamental Algorithms, Sorting and Seaching and Semi-Numerical Algorithms). They have everything you need to know, and plenty more. Knuth explains various type of B-Tree and plenty of merging algorithms. Cesar David Rodas Maldonado wrote: I meen

Re: [sqlite] Syntax Error Loading Values Into Table -- SOLVED!

2006-09-20 Thread Rich Shepard
On Wed, 20 Sep 2006, Rich Shepard wrote: What did I miss here, please? Mea culpa! I specified only one column, not both. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.(TM)|Accelerator

[sqlite] Syntax Error Loading Values Into Table

2006-09-20 Thread Rich Shepard
I have a table created as: CREATE TABLE hedge (hedge_id integer primary key, hedge_name text); Within the sqlite3 shell I try to load values from the file, 'load-hedges.sql,' and the file has 16 lines of the form: insert into hedge (hedge_name) values ('around'); SQLite complains, "load_

Re: [sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread Markus Hoenicka
I don't know about sqlitebrowser. For the sqlite command line tool to display Umlauts properly, you need to tell your terminal that the data are UTF-8 encoded. On Unix-like systems it should be sufficient to start xterm with the "-en UTF-8" option. Other terminal emulators like rxvt may have simila

Re: [sqlite] Creating Database From File

2006-09-20 Thread Rich Shepard
On Wed, 20 Sep 2006, Martin Jenkins wrote: You don't *have* to use the CLI to create the database, you can do it from any language that has a binding for SQLite. That's why I showed what the equivalent commands were in the CLI and for pysqlite. Sorry if it wasn't useful. Martin, I'm working

Re: [sqlite] Creating Database From File

2006-09-20 Thread Martin Jenkins
Rich Shepard wrote: Further investigation reveals that the correct approach is to use indirection; specifically: [EMAIL PROTECTED] /data1/eikos]$ sqlite3 testing.db < feia.sql You don't *have* to use the CLI to create the database, you can do it from any language that has a binding for SQLit

Re: [sqlite] Creating Database From File

2006-09-20 Thread Rich Shepard
On Wed, 20 Sep 2006, Martin Jenkins wrote: I've never used -init but a CLI session to create a table is simply: Martin, I _am_ using the CLI; that's what the Command Line Processor (CLP) is for. C:\>sqlite3 test Loading resources from C:\Documents and Settings\Mar

Re: [sqlite] Creating Database From File

2006-09-20 Thread Martin Jenkins
Rich Shepard wrote: My copy of Mike Owen's excellent book arrived yesterday and I'm trying to create and populate (with tables, data, and triggers) a new database using the CLP. I've never used -init but a CLI session to create a table is simply: C:\>sqlite3 test Loa

Re: [sqlite] Re: speeding SQLite on a cross-join over two tables

2006-09-20 Thread P Kishor
Apologies for the misposting, a result of typos and several versions of these queries that I was trying out. See below for more responses -- On 9/20/06, Dennis Cote <[EMAIL PROTECTED]> wrote: P Kishor wrote: > Gentlefolks, .. > You have an error in the select statement inside your create view

[sqlite] Creating Database From File

2006-09-20 Thread Rich Shepard
My copy of Mike Owen's excellent book arrived yesterday and I'm trying to create and populate (with tables, data, and triggers) a new database using the CLP. But, the '-init' command seems to want only a single table rather than a set of them. I also tried interactively, but the '.import' functi

Re: [sqlite] search & replace

2006-09-20 Thread drh
IAIN GALLAGHER <[EMAIL PROTECTED]> wrote: > Thanks, Richard for replying. > > Trying to run your script (Tcl) I get the error "Can't find sqlite3" even if > I specifically point to /usr/bin/sqlite3 in the script (on Suse linux 10.1). > > What can I do to get tcl to find sqlite3? > Easiest way

Re: [sqlite] Re: speeding SQLite on a cross-join over two tables

2006-09-20 Thread Dennis Cote
P Kishor wrote: Gentlefolks, I tried my own steps as stated below, and failed rather miserably. I created everything as below, and ran an UPDATE yesterday mid-aft. Came back this morning, and by mid-morning it hadn't even budged. Killed the process, and tried a simple about 10 mins ago SELECT *

Re: [sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread Martin Jenkins
Wolfgang Qual wrote: > > Hi Markus, thanks for this hint. Using an editor, I saw that the > > "Umlauts" are there. But is there a way to make the Umlauts visible > > also on the sqlite-commandline/sqlitebrowser (for select-statements > > necessary)? Wolfgang, You didn't say which OS you're using

Re: [sqlite] search & replace

2006-09-20 Thread IAIN GALLAGHER
Thanks, Richard for replying. Trying to run your script (Tcl) I get the error "Can't find sqlite3" even if I specifically point to /usr/bin/sqlite3 in the script (on Suse linux 10.1). What can I do to get tcl to find sqlite3? I have managed to export my database to openoffice.org calc (spreads

Re: [sqlite] search & replace

2006-09-20 Thread drh
IAIN GALLAGHER <[EMAIL PROTECTED]> wrote: > I have a database of scientific references. In that database there is a table > (bibref) containing a field (Author). I would like to search for ampersand > (&) and replace it with a semicolon (;) in the Author field. > > How do I do this? > In Tcl:

Re: [sqlite] speeding SQLite on a cross-join over two tables

2006-09-20 Thread Jay Sprenkle
On 9/19/06, P Kishor <[EMAIL PROTECTED]> wrote: CREATE VIEW v_attr AS SELECT pt.id AS pt_id, Count(pt.id) AS pt_id_count, py.attr AS py_attr FROM pt JOIN py ON ( (pt.x BETWEEN py.xmin AND py.xmax) AND (pt.y BETWEEN py.ymin AND py.ymax) )

Re: [sqlite] search & replace

2006-09-20 Thread Jay Sprenkle
On 9/20/06, IAIN GALLAGHER <[EMAIL PROTECTED]> wrote: I have a database of scientific references. In that database there is a table (bibref) containing a field (Author). I would like to search for ampersand (&) and replace it with a semicolon (;) in the Author field. How do I do this? The si

[sqlite] search & replace

2006-09-20 Thread IAIN GALLAGHER
I have a database of scientific references. In that database there is a table (bibref) containing a field (Author). I would like to search for ampersand (&) and replace it with a semicolon (;) in the Author field. How do I do this? Thanks Iain

[sqlite] Re: speeding SQLite on a cross-join over two tables

2006-09-20 Thread P Kishor
Gentlefolks, I tried my own steps as stated below, and failed rather miserably. I created everything as below, and ran an UPDATE yesterday mid-aft. Came back this morning, and by mid-morning it hadn't even budged. Killed the process, and tried a simple about 10 mins ago SELECT * FROM v_attr WHER

Re: [sqlite] utf8 decode

2006-09-20 Thread Roy Tam
Hi, I think you should provide sample data in order to dig out the problem. Regards, 2006/9/20, 卢炎君 <[EMAIL PROTECTED]>: Hi guys First of all, all data be complied as UTF-8 stored in my DB. Second, When I used sqlite browser tool (from sourceforge)to browsed my DB, the result of chine

Re: [sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread A. Klitzing
Wolfgang Qual schrieb: > Hi Markus, > thanks for this hint. Using an editor, I saw that the "Umlauts" are there. > But is there a way to make the Umlauts visible also on the > sqlite-commandline/sqlitebrowser (for select-statements necessary)? > > Best regards, > Wolfgang Hello, you can try SQ

Re: [sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread Wolfgang Qual
Hi Markus, thanks for this hint. Using an editor, I saw that the "Umlauts" are there. But is there a way to make the Umlauts visible also on the sqlite-commandline/sqlitebrowser (for select-statements necessary)? Best regards, Wolfgang Original-Nachricht Datum: Wed, 20 Sep 2006

Re: [sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread Markus Hoenicka
What you see is not necessarily what sqlite returns. It depends on your shell whether the UTF-8 output of sqlite (or of any other app) is displayed correctly or displayed at all. To check whether the output (as opposed to the screen display) is correct, you can either pass the output to less (it wi

Re: [sqlite] How to speed up the performance in LIMIT & OFFSET?

2006-09-20 Thread Michael Scharf
PY wrote: In fact, I use sqlite in a embedded device. So the memroy problem is really critical to us. For profermance improving, all of the database running in a in-memory database. Hmm, I am not 100% sure, but I think queries like select distinct x from foo or select distinct x from foo or

[sqlite] German umlauts (äöüß) are not displayed in sqlite - solution

2006-09-20 Thread Wolfgang Qual
Hi list, I have a problem with german umlaut-characters (ä,ö,ü,ß) in sqlite - they are not displayed both in sqlite-command line and in sqlitebrowser. Background: I use sqlite3 as a database for the open source GIS GRASS: inside GRASS, I imported a dbf-table into the sqlite-database. Is there a

[sqlite] utf8 decode

2006-09-20 Thread 卢炎君
Hi guys First of all, all data be complied as UTF-8 stored in my DB. Second, When I used sqlite browser tool (from sourceforge)to browsed my DB, the result of chinese characters are correct, then I write a function which just call sqlite3_column_text inside it, Demo like below: const char

Re: [sqlite] Optimistic concurrency control

2006-09-20 Thread Nikki Locke
Mikey C wrote: > Maybe I didn't make the question clear. I'm not talking about locking and > multiple writers. I'm talking about optimistic concurrency control in a > disconnected environment. > > Two processes (say a webserver). One reads some data and presents it to a > user (open - re

RE: [sqlite] about temp table

2006-09-20 Thread Denis Povshedny
Hello Sarah, First of all, to create TEMPorary table you shall use one of the following statements: create temp table myt(age smallint) or create table temp.myt(age smallint) WBR, Denis -Original Message- From: Sarah [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 1:31 PM

[sqlite] about temp table

2006-09-20 Thread Sarah
Hi,all I met some problem when executing the following test program in an embedded environment without os. It seems that temp table isn't created correctly. sqlite3_exec(db, "create table myt(age smallint)", NULL, NULL, NULL); Could someone explain 'the functionality of temp table and when it

Re: [sqlite] How to speed up the performance in LIMIT & OFFSET?

2006-09-20 Thread PY
Dear Chandrashekar, Sorry, I don't understand what is the precompiled query. Would you please help me to descript that? Thanks for your great help. VK On 9/19/06, Chandrashekar H S <[EMAIL PROTECTED]> wrote: Hi Are u using precompiled queries? If not try using it... On 9/19/06, PY <[EM

Re: [sqlite] How to speed up the performance in LIMIT & OFFSET?

2006-09-20 Thread PY
Hi all, Thanks for your suggestion. In fact, I use sqlite in a embedded device. So the memroy problem is really critical to us. For profermance improving, all of the database running in a in-memory database. For my case, is that will improve the query performance if I create the temp table of FO