Hi Frank,
>any function of a NULL returns NULL.
The correct statement would be, "Any function of a NULL should return NULL". I don't think it's always the case in VFP but it's irrelevant in this case.
> That is not a bug, as I understand the matter. The bug is not that PADR(NULL, nn) returns NULL but that VFP incorrectly calculates the size of the field in the resulting record set in this case.
> CAST seems to have special powers: I'm not sure this is a good thing (NVL, or ISNULL in T-SQL, should be used in the SELECT, IMHO).
You seems to be confused about issue. The CAST(NULL AS C(nn)) does return NULL as it suppose to and also creates a column/field of appropriate type because in the world of SQL everything has type.
The CAST() is preferable function to use in a query. It was designed with such use in mind and for compatibility with SQL Server.
> As Chris Date has spent quite a bit of energy explaining, NULL is not a value, and should never be able to function as a value.And it's relevant here how?
--sb--