Re: [sqlite] Median as an aggregate function using the tcl interface

2004-06-08 Thread Dennis Cote
- Original Message - From: "Detlef Groth" <[EMAIL PROTECTED]> > After consulting the php-sources I could hack the tclsqlite.c file > myself to add aggregation capabilities to tcl, this should go into the > next release: This looks good. I'm surprised it didn't exist already. > proc Med

RE: [sqlite] Median as an aggregate function using the tcl interface

2004-06-08 Thread Detlef Groth
Hello, After consulting the php-sources I could hack the tclsqlite.c file myself to add aggregation capabilities to tcl, this should go into the next release: the diff: 2c2 < ** 2001 September 15 --- > ** 2004 June 8 added aggregate function by Dr. Detlef Groth (dgroth at gmx.de) 43a44,54 > /*

Re: [Fwd: [sqlite] Median as an aggregate function using the tcl interface]

2004-06-08 Thread Detlef Groth
Thanks for your suggestion, indeed it is called for each row. That's my problem. A better solution which just extract the last result is: package require sqlite sqlite sql d:/data/yaspo2004bt.sqlite sql function median Median set l [list] proc Median {value} { global l lappend l $value re

[sqlite] Median as an aggregate function using the tcl interface

2004-06-07 Thread Detlef Groth
Hello, Is it possible to write the median as an aggregate function using pure tcl. I did the following: package require sqlite sqlite sql d:/data/yaspo2004bt.sqlite sql function median Median set l [list] proc Median {value} { global l lappend l $value # not absolute exact but just a draf