How can i use a min() funct in this sql query?
开发者_JS百科UPDATE
MRT
SET
Date = MR.Date
FROM
MRT
JOIN MR on MR.SKU = MRT.SKU
HERE Is where i would like to do an order by min(mr.Date)
All I get is an incorrect Syntax error.
I have to set the date = the smallest mr.date
UPDATE MRT SET Date = (SELECT min(Date) FROM MR WHERE MR.SKU = MRT.SKU);
精彩评论