语法错误我的案例陈述中缺少运算符

时间:2018-12-11 09:17:35

标签: sql ms-access

我在ACCESS中编写的以下SQL出现错误,我的错误在哪里?我还有其他when语句要添加

UPDATE daily_inventory t0
SET 
t0.Type = CASE  
    WHEN t0.[item number] LIKE "*-FG-*" 
    THEN "Float"
END

enter image description here

1 个答案:

答案 0 :(得分:1)

MS Access将不支持CASE表达式,而使用IIF()

UPDATE daily_inventory AS t0
     SET t0.[Type] = IIF(t0.[item number] LIKE "*-FG-*", "Float", '<whatever>')