| 40 | |
| 41 | |
| 42 | -- now I still have when joining on date and station some fish pointing to more than one operation |
| 43 | select * from wrbd.fish_fi join wrbd.operation_op op on (fi_date,fi_st_id)=(op_date,op_st_id) |
| 44 | where fi_op_id is null and fi_date is not null; -- 58 |
| 45 | |
| 46 | -- only two choices there... One with 8 fishes (fi_id 10761 to 10768) one with 21 8 is 1674 21 is 1675 |
| 47 | select * from wrbd.fish_fi where fi_id>=10761 and fi_id<=10768; -- to verify |
| 48 | update wrbd.fish_fi set fi_op_id=1674 where fi_id>=10761 and fi_id<=10768; |
| 49 | |
| 50 | select * from wrbd.fish_fi join wrbd.operation_op op on (fi_date,fi_st_id)=(op_date,op_st_id) |
| 51 | where fi_op_id is null and fi_date is not null; -- 42 |
| 52 | |
| 53 | select * from wrbd.fish_fi where fi_id>=10769 and fi_id<=10789; -- to verify |
| 54 | update wrbd.fish_fi set fi_op_id=1675 where fi_id>=10769 and fi_id<=10789; |
| 55 | |
| 56 | -- OK finished for pivot on date |
| 57 | |
| 58 | select * from wrbd.fish_fi where fi_op_id is null; --1346 still.... some have dates uh ? |