I have this cross table update join operation in MySQL that works perfectly but when executed against SQLite it wouldn't work.
The error message given by SQLite was quite vague and I wasn't sure what's wrong or different between both SQLs that is causing the problem.
How can I get it working for SQLite?
Query that works in MySQL:
update
`entries`
inner join `transactions` on `entries`.`transaction_id` = `transactions`.`id`
and `transactions`.`batch_id` = 4
and `entries`.`number` = "2010"
set
`entries`.`prize` = "consolation",
`entries`.`winnings` = entries.amount * 500,
`transactions`.`winnings` = transactions.winnings + (entries.amount * 500)
Error message given by SQLite:
Result: near "inner": syntax error
At line 1:
update
`bets`
inner