[sqlite] import tab separated values from bash command

2008-08-30 Thread Jan Ptacek
Hello everyone. I am a bit struggling with following commands from my Makefile sqlite3 ${DB} '.read create.sql' sqlite3 ${DB} '.separator "\t"' sqlite3 ${DB} ".import filtered.freqlist.tsv table" this obviously wont work, because the third incarnation of sqlite has the std separator

[sqlite] SQLite 3.6.1 memory leak?

2008-08-30 Thread Ulric Auger
Hi, Since I updated to SQLite 3.6.1 I have a memory leak when my application exits. If I compile using SQLite 3.5.8 I don't have the memory leak. VS 2005 dump: Detected memory leaks! Dumping objects -> c:\dev\mescruiser\lib\sqlite\sqlite3.c(11938) : {4754} normal block at 0x01BFC460, 48

[sqlite] core dump in 8.5.4 using SQLite ... more info

2008-08-30 Thread spam
I'm having difficulty with SQLite 3.6.1 and Tcl 8.5.4, essentially the script runs to completion, correctly I might add, but upon termination, I get a core dump on FreeBSD 7.0Release. Tcl 8.4 has no such problems with the same script. I rebuilt tclsh using the following configure script (to

Re: [sqlite] problem using random() in queries

2008-08-30 Thread Wiktor Adamski
> Richard, Before you "fix" it, I'm not convinced it is broken. > > >From MS SQL server > > create table _names (N varchar(5)); > insert into _names values('a'); > insert into _names values('b'); > insert into _names values('c'); > insert into _names values('d'); > insert into _names values('e');

[sqlite] problem with update trigger

2008-08-30 Thread Bernd Lehmkuhl
hello list, my problem is rather related to sql in general than to sqlite but as I'm using sqlite as my db and there are so many authorities of sql in this list I thought of asking my question here. I have the following schema: CREATE TABLE T_Linien( handle TEXT , von TEXT , nach

Re: [sqlite] SQLite 3.6.1 memory leak?

2008-08-30 Thread Robert Simpson
There's not enough information in your post for us to comment -- which is probably why nobody responded earlier. The unit tests for SQLite create thousands of connections and run hundreds of thousands of commands without leaking. So there's a probability that you may be doing something wrong,

Re: [sqlite] create table if not exists & virtual table?

2008-08-30 Thread Petite Abeille
On Aug 28, 2008, at 11:39 PM, Scott Hess wrote: > There is already such a feature request at: > http://www.sqlite.org/cvstrac/tktview?tn=2604 > > I just added a patch there which, I believe, implements this. I'm > going to float it on sqlite-dev to see if I'm missing anything. Nice :) Hope

Re: [sqlite] SQLite 3.6.1 memory leak?

2008-08-30 Thread Eric Minbiole
Ulric Auger wrote: > Hi, > > Since I updated to SQLite 3.6.1 I have a memory leak when my application > exits. > > If I compile using SQLite 3.5.8 I don't have the memory leak. Be sure to call sqlite3_shutdown() just before the application exits-- this should free any outstanding resources

Re: [sqlite] problem with update trigger

2008-08-30 Thread Igor Tandetnik
"Bernd Lehmkuhl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My goal is that 'von' always contains values that are smaller than > 'nach'. > > Unfortunately the update doesn't quite work as I expected it to do: > > UPDATE T_Linien > SET handle = '0815' >WHERE von = 'c' >

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-30 Thread Teg
Hello Dave, Saturday, August 30, 2008, 4:52:26 AM, you wrote: DD> You ought to think very carefully before storing anything resembling DD> raw hbitmap data into your database. You will be embedding obscure DD> dependencies on windows (vs macos or unix), arcane hardware requirements DD> such as

Re: [sqlite] import tab separated values from bash command

2008-08-30 Thread Igor Tandetnik
"Jan Ptacek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am a bit struggling with following commands from my Makefile > sqlite3 ${DB} '.read create.sql' > sqlite3 ${DB} '.separator "\t"' > sqlite3 ${DB} ".import filtered.freqlist.tsv table" > > this obviously wont work,

[sqlite] help with SQL

2008-08-30 Thread Greg Morphis
I have this SQL in Postgres and it works fine, I'm trying to port it over to SQLite and having issues.. SQLite doesnt like left outer joining to a subquery.. Can you guys think of a way around this? select b.amountowed, b.apr, b.dueday, b.minimumdue, b.payee, p.note, b.payeeid, case when p.amount

Re: [sqlite] help with SQL

2008-08-30 Thread Greg Morphis
It's not liking the "as" ... this works more or less.. select b.amountowed, b.apr, b.dueday, b.minimumdue, b.payee, b.payeeid, b.iscc, b.isactive, p2.payeeid, p2.amount, case p2.amount when '' then 0 else sum(amount) end as amount, case p2.payments when null then 0 else 1 end as paid, payments