At 10:05 PM +0200 9/22/04, Konstantin Malakhanov wrote:
Write a "flatten" aggregate function for sqlite with
sqlite3_create_function() or sqlite_create_aggregate() for sqlite3 resp.
sqlite 2.

This is what I've done for my project. The function will take a field
name and append the content of it to some string buffer. Probably
interleaving field values with "," At the end, the contents of string
buffer is the result of the function.

I have seen a more generic implementation of such a function in a built-in MySQL extension; it's called "GROUP_CONCAT". In my mind, some of these might be good to include in the SQL standard.


Meanwhile, yes, sqlite3_create_function() is the way to go for now.

-- Darren Duncan

Reply via email to