Hi Steve,

Thanks for your ideas. Unfortunately none of them seem to work. I should
have mentioned it right from the beginning I guess, the dbase is Paradox.
Any ideas how add fields in Paradox?

John

>-----Your Message-----
>depending on your sql dialect you could try:
>
>SELECT IF(s1 IS NULL, 0, s1) + IF(...
>SELECT IFNULL(s1, 0, s1) + IFNULL(...
>SELECT COALESCE(s1, 0) + COALESCE(...
>
>Steve
>
>> -----Original Message-----
>> I'd like to add multiple fields in a db query. That is not a
>> problem, like:
>>
>> select s1+s2+s3 as TotalAmount
>>
>> However, when one of the field values is null, then the
>> result is zero. How
>> can I get this to work?
>>
>> TIA,
>>
>> John

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to