Try
UNION ;
SELECT DISTINCT STR(0, 19) + TTOC(DATETIME(2000,01,01,12,00,00), 1) max_dt ;
FROM names ;
WHERE RECNO() = 1 ;
INTO CURSOR viewNames_Max
>Thanks Sergey, your help led me to a path that would work. What was required to work around the problem was a dumby record.
>
>SELECT STR(a.id, 19) + MAX(TTOC(a.effective_date, 1)) max_dt ;
>FROM names a ;
>GROUP BY a.id ;
>UNION ;
>SELECT DISTINCT STR(0, 19) + TTOC(DATETIME(2000,01,01,12,00,00), 1) max_dt ;
>FROM names a ;
>WHERE 1 = 1 ;
>INTO CURSOR viewNames_Max ;
>ORDER BY 1
>
>The first query pulls all of the valid records, the second creates the dumby record. Do you know of a way to create the record without using "WHERE 1 = 1" and "DISTINCT"?
>
--sb--