Skip to content

Tag: sql

Syntax error possibly due to multiple ANDs?

UPDATE bookings b SET reservation_processed = ‘archived’ JOIN reservation_time_data r ON r.id = b.reservation_time WHERE premises_code = ‘LJJIDHhRN2ho1e3h’ AND reservation_date LIKE ‘%2020-09-10%’ …

How to deselect duplicate entries in a query?

I’ve got a query like this: and this query returns the result like this: As you can see in the image there is 3 duplicate, unnecessary entries (no, i can’t delete them because of the multiple foreign keys). How can I deselect these duplicate entries from the result query? In the end I want to retu…