skip to Main Content

Mysql – Check if a record from one table exists in another and disable option

Attempt - which returns all registrations that has reportDate = CURRENT WEEK. SELECT * FROM registrations LEFT JOIN reports on registrations.registration=reports.registration WHERE reports.reportDate between cast(timestampadd(SQL_TSI_DAY, -(dayofweek(curdate())-2), curdate()) as date) and cast(timestampadd(SQL_TSI_DAY, 7-(dayofweek(curdate())-1), curdate()) as date) I want to achieve the…

VIEW QUESTION
Back To Top
Search