>Ok, thanks. I was hoping for a more glorious solution, but that is what I had in mind as well.
If don't like IIF there is an other kludge
create an function My_Min like
PROCEDURE My_Min
LPARA;
v1,v2,..,v26
do case
case pcount()=2
return min(v1,v2)
case pcount()=3
return min(v1,v2,v3)
..
case pcount()=26
return min(v1,v2,v3,..,v26)
otherwise
return .NULL.
ENDCASE
ENDPROC
your SQL
SELECT
MIN(My_Min(n1,n2,n3)) AS nMinResult;
FROM ....
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]