Re: group max() on dates with nulls
Posted in 1994
> > In the report AFTER GROUP statement below, assume c_var holds only NULL > values: > > IF GROUP MAX(c_var) IS NOT NULL > THEN PRINT GROUP MAX(c_var) USING "mm/dd/yy" > END IF > > I would assume that the 'IF' statement would be false, and nothing > should print. Instead, it prints "mm/dd/yy" on the report, which is the > printing of a NULL GROUP MAX(). > > Does anyone know why? > MAX() always returns a value, even if there is nothing to return. The trick is to select two values, and test the second one for NULLness cheers j. _____________________________________________________________________________ Jack Parker | Hewlett Packard, BSMC Boise, Idaho, USA| Domini, Domini, Domini jparker@hpbs3645.boi.hp.com | you're all Catholic now. (208) 396-5388 (W) (208) 384-1623 (H) | - FT _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________