Alistair,
CREATE TEMP VIEW FirstFileMinDates (File_Code, MinFile_Date) AS +
  SELECT File_Code, MIN (File_Date) +
    FROM Files t2 +
    GROUP BY File_Code

UPDATE FilesData +
  SET FirstFileDate = t2.MinFile_Date +
    FROM FilesData, Files t2 +
    WHERE (FilesData.T1 = t2.File_Code)

Bill

On Wed, Feb 11, 2009 at 6:59 AM, Alastair Burr
<[email protected]>wrote:

>  I must be having (yet another) off-day:
>
> I can't find a way to update one table with the min value from another
> table:
>
>
> UPDATE FilesData SET FirstFileDate = MIN(File_Date) +
>
>   FROM FilesData T1, Files T2 +
>
>   WHERE T1.IdNum = T2.File_Code
> Thanks in advance for any guidance,
>
>
>
> Regards,
>
> Alastair
>
>
>
> ----------------------------
>
> Alastair Burr
>
> St. Albans, UK.
>
> [email protected]
>
> -----------------------------
>
>
>

Reply via email to