... and learned how to use IF and CASE statements with MySQL at the same time! :)
Oh, and it's actually precisely because FIM doesn't exist anymore that I want to convert it to euro. ;) (And SEK just comes along for the ride.)
Harald Fuchs wrote:
You've got it almost right:
SELECT SUM(CASE cur WHEN 'EUR' THEN amount WHEN 'FIM' THEN amount / 5.94573 WHEN 'SEK' THEN amount / 9.294 END) AS "Amount, total" FROM table1;
By the way: 'FIM' doesn't exist anymore ;-)
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]