I have a table with pairs of records, each can be tied together via an ID number. Each pair has a time value where 1 record might be the same or later in time than its pair. I want to update the check_time field where the newer time = 'Y' and the older time can stay the default 'N'. If the times are the same, I want to use a different field that happens to be boolean (0,1) to determine the check_time field, something like if boolean_field = 0 set check_time = 'Y'
I'll try to create sample table data in code section.
record | shared_id | boolean_field | time | check_time
1 | 25 | 0 | 3:01 | Y
2 | 25 | 1 | 3:00 | N