我在ACCESS中编写的以下SQL出现错误,我的错误在哪里?我还有其他when语句要添加
UPDATE daily_inventory t0
SET
t0.Type = CASE
WHEN t0.[item number] LIKE "*-FG-*"
THEN "Float"
END
答案 0 :(得分:1)
MS Access将不支持CASE
表达式,而使用IIF()
:
UPDATE daily_inventory AS t0
SET t0.[Type] = IIF(t0.[item number] LIKE "*-FG-*", "Float", '<whatever>')