Home › Forums › Other › SQL Error – Help! › Re: SQL Error – Help!
June 3, 2013 at 2:18 pm
#137483
Participant
Well, it didn’t tell me. It just said that I have an error. Anyway, the problem was that “SET” shouldn’t be used only at the start of the statement.
Like this:
UPDATE orders
SET status_comanda = CASE ID
WHEN 9 THEN ‘bun’
WHEN 8 THEN ‘nebun’
END,
nr_awb = CASE ID
WHEN 8 THEN ‘nebunicel’
END,
telefon = CASE ID
WHEN 7 THEN ‘666DA’
END,
genre = CASE ID
WHEN 6 THEN ‘M’
END
WHERE ID IN (9,8,7,6)