Re: [sqlite] String interning using foreign keys: How to write anINSERT trigger?

2010-04-22 Thread Igor Tandetnik
Dan Bishop wrote: > -- The statement below is invalid syntax. > INSERT INTO Emails ( > MessageID, > (SELECT ID FROM Addresses WHERE Address=FromAddr), > (SELECT ID FROM Addresses WHERE Address=ToAddr) > ) INSERT INTO Emails values ( MessageID, (SELECT ID FROM

[sqlite] String interning using foreign keys: How to write an INSERT trigger?

2010-04-22 Thread Dan Bishop
We have a e-mail program that uses a table like: CREATE TABLE Emails ( MessageID TEXT, FromAddr TEXT, ToAddr TEXT, -- ... ); The database takes up hundreds of megabytes of disk space. In order to avoid the duplication of storing the same addresses thousands of times, I'm planning

[sqlite] column output truncating

2010-04-22 Thread Derek Martin
Hi, I have a query that produces about 10 columns, some of which are very wide. When I run sqlite3 with -column -header, it truncates all fields to 10 characters. This makes the query absolutely useless. How can I turn off this truncation? I already tried explicitly setting the width to 0,

[sqlite] sqlite buffer bugs !

2010-04-22 Thread kerim fırat
Merhabalar.. .6.18 sürümünü etkileyen bir açık tesbit edilmiştir.. açık:memcpy(zSql, zLine, nSql+1); parametresinde mevcuttur... nSql değişkeni int tipindedir. nSql 'e gönderilecek -1 değeri zline değişkeninden zSql değişkenine 4 küsür gb veri kopyalamaya çalışacak. memcpy fonksiyonun

Re: [sqlite] Install python-apsw under different name?

2010-04-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/22/2010 02:19 PM, Nikolaus Rath wrote: > To prevent other applications from accidentally using the 32bit apsw, > I therefore wanted to install this version under a different module > name. Please post your question to the python-sqlite mailing

[sqlite] Install python-apsw under different name?

2010-04-22 Thread Nikolaus Rath
Hello, I am compiling apsw with SQLITE_32BIT_ROWID by adding the #define to sqlite3/sqlite3config.h after running 'setup.py fetch --sqlite'. However, as I understood, the resulting apsw will not work with normal, 64-bit rowid databases. To prevent other applications from accidentally using the

Re: [sqlite] Date Dimension

2010-04-22 Thread Adam DeVita
good ideas. The spread sheet trick hadn't occurred to me. I think I'll go that route since it keeps things user readable thank you for your thoughts, all. regards, Adam On Thu, Apr 22, 2010 at 2:51 AM, Oliver Peters wrote: > > Adam DeVita writes: > > > >

Re: [sqlite] ExecuteNonQuery() consuming memory

2010-04-22 Thread Sylvain Pointeau
Hello, if you are using System.Data.Sqlite, please post your question to their forum: http://sqlite.phxsoftware.com/forums/ if you don't use this lib, I strongly recommend it to you. and my view on your problem is that you don't call dispose on the

Re: [sqlite] Date Dimension

2010-04-22 Thread Oliver Peters
Adam DeVita writes: > [...] > > If I have to generate the date dimension on my own, I'm hoping to use > something like > create table date_dimension ( > [Dateid] integer primary key, > [Real_Year] int , > [Month_name] text, > [Day] int , > [QuarterNumber] int, >