UPDATE wpcurrate
SET usd = (SELECT (mo.price * wpcurrate.midprice) as USD
FROM mo, wpcurrate
WHERE wpcurrate.symbol = mo.symbol)
WHERE mo.curdatetime BETWEEN '2015-07-01 12:00:00 AM' AND '2015-07-31 11:59:59 PM'
显示以下错误:
Msg 4104,Level 16,State 1,Line 1
无法绑定多部分标识符“mo.curdatetime”。Msg 4104,Level 16,State 1,Line 1
无法绑定多部分标识符“mo.curdatetime”。
答案 0 :(得分:1)
您可以尝试以下代码:
luck_30.text = profile.luck_30
答案 1 :(得分:1)
UPDATE w
SET w.usd = mo.price * w.wpcurrate.midprice
FROM wpcurrate w
Inner Join mo on w.symbol = mo.symbol
WHERE mo.curdatetime between '2015-07-01 12:00:00 AM' and '2015-07-31 11:59:59 PM'
您需要执行连接操作才能实现此目的