[sqlite] Restrictions on table names

2007-02-19 Thread Pablo Santacruz
I'd like to know if there is any restriction on table names. Thanks in advance -- Pablo

Re: [sqlite] Inserting Values in Bulk

2006-09-13 Thread Pablo Santacruz
Try this, it may suits you. (I'm using pysqlite from trac) from pysqlite2 import dbapi2 as sqlite import csv con = sqlite.connect("mydb") cursor = con.cursor() reader = csv.reader(open("some.csv", "rb")) qmarks = "?," * 30 + "?" #1 for row in reader: #row is a tuple cursor.execute("insert

Re: [sqlite] speeding up a query

2006-08-26 Thread Pablo Santacruz
Try something like this: CREATE INDEX ix_polys ON polys (xmin, ymin, xmax, ymax); SELECT name FROM polys WHERE EXISTS (SELECT x FROM points WHERE point_id = 1 AND xmin < x AND ymin < y AND xmax x AND ymax > y); In your query you do 4 select from points table. Here, you do only one. I think

Re: [sqlite] RE: UNICODE Support

2006-08-12 Thread Pablo Santacruz
Consider upgrading to 3.3.6. The following are some changes related to the UTF stuff. *2006 June 6 (3.3.6)* - Fix an obscure segfault in UTF-8 to UTF-16 conversions *2006 April 5 (3.3.5)* - The sqlite3_create_collation() function honors the SQLITE_UTF16_ALIGNED flag. On 8/4/06,

Re: [sqlite] Attach db code

2006-08-10 Thread Pablo Santacruz
First, connect to your db file. As this is the first connection this will be referred as 'main'. Then you need to attach a memory database. ATTACH DATABASE ":memory:" AS mem; Create your table definitions in memory, por example: CREATE TABLE mem.table1 (... You can get some info from: SELECT