Re: [SQL] adding fields containing NULL values

2000-05-29 Thread Grant Finnemore
Werner, > Umfortunately 'select employee,date,sallary+extras as total' doesn't give the > desired result because 'somevalue + NULL' is considered to be NULL. > Is there any solution for my (small) problem? Try SELECT employee, date, salary + COALESCE(extras, 0) as total FROM ... Regards Gr

[SQL] adding fields containing NULL values

2000-05-29 Thread Werner Modenbach
Hi all! Let's say I have a table like: employee datesallary extras -- Name1 01-31-1999 5000.00 NULL Name1 02-29-1999 5000.00 500.00 Name1 03-31-1999 5000.00 NULL I would like to get something like: employee datetotal