On Dec 10, 2007 3:02 PM, MB Software Solutions <[EMAIL PROTECTED]> wrote: > > I added the NVL because without it, the result could be .NULL. and the > array doesn't get created. I ask this question because the idea of an > NVL around a SQL SUM seems odd to me, like it wouldn't evaluate in the > proper sequence perhaps. >
Do you want the sum of any column containing a NULL to be zero, or do you want the sum of all the non-NULLs in the column, with NULL coerced to zero? Your example does the first. Placing the SUM outside the NVL does the latter. -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

