This is my code
UPDATE ks_tidy SET announcedWeek = (
SELECT week(dateAnnounced) as weekAnnounced
FROM ks_tidy ) WHERE announcedWeek = ''
and the problem I'm running into is it doesn't work when I'm trying to update more than 1 row?
1242 - Subquery returns more than 1 row
My table has two columns: dateAnnounced (DATE[yyyy-mm-dd], UNIQUE, PRIMARY KEY), weekAnnounced (INT). The weekAnnounced column was added to store weekAnnounced, which I am trying to "calculate" using the WEEK() SQL function. I have thousands of rows of data and this table gets updated regularly so manually doing this is not an option.