Paul Hartland (ISHARP)
paul.hartland at isharp.co.uk
Thu Nov 24 09:07:47 CST 2005
Not sure about MYSQL, but off the top of my head I think I would use something like the following in SQL Server SELECT SUM(CAST([FieldInteger] AS Float)) FROM tblTable Or possibly SELECT SUM(CONVERT(Float, [FieldInteger])) FROM tblTable If it works, let me know as I want to start getting into MYSQL....In fact if anyone knows if and where a good front-end for MYSQL exists (hopefully similar to Enterprise Manager) then could you let me know. Paul Hartland -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 24 November 2005 14:52 To: accessd at databaseadvisors.com Subject: [AccessD] OT: Sum in MySQL Hi all I recall we have some MySQL gurus around ... If you have a field of datatype Integer (Long in Access) and wish to sum this from a large amount of records, how would you do in MySQL? In Access you would do something like: SELECT SUM(CDbl([FieldInteger])) FROM tblTable ...; and the result would be a - potentially very large - Double. What to use for CDbl() in MySQL? /gustav -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com