开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜