On 3/21/08, Gilles Ganault <[EMAIL PROTECTED]> wrote: > Hello > > I searched on the web site and "The definitive guide to SQLite", but > didn't find if it's possible to format the output from the SUM() > function: > > SELECT SUM(invoice_amount) AS Amount FROM invoice"; > > => With invoice_amount defined as TEXT, I'd like this number to be > formatted as "100.000,00', ie. using the dot as the thousands' > separator, and the comma as the decimal separator. If required, I can > turn this from TEXT to REAL, but I'd rather keep this column as TEXT.
I don't think there is any built in string formatting function in SQlite, but you are free to roll your own using sqlite3_create_function(). See http://www.sqlite.org/c3ref/create_function.html > > Thank you. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://punkish.eidesis.org/ Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/ Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users