Hasan A Yousef
Hasan A Yousef

Reputation: 25008

Syntax error Missing operator in my case statement

I got an error with the below SQL I wrote in ACCESS, where is my mistake? I've other when statements to add

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

enter image description here

Upvotes: 0

Views: 269

Answers (1)

Yogesh Sharma
Yogesh Sharma

Reputation: 50173

MS Access won't support CASE expression use IIF() instead :

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

Upvotes: 1

Related Questions