I tried using an SQL query below but got an error which says:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'IF'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'THEN'.
Here's the SQL query
UPDATE TBLGPS
IF speed >= 0
THEN SET REMARKS = 'Running'
ELSE SET REMARKS = 'Stopped'
WHERE PLATENO = 'ALCORAN-WIH312' AND TRXTIME = '13:16:20'
Can anyone tell me where I went wrong?