UPDATE tb_int_attendlist_spc set
fixed_id = case when fixed_id = '0' then '부적합'
when fixed_id = '1' then '적합'
else ''
end
where attend_dt = '20220204'
and emp_no = '10521608'
// mysql 쿼리를 위처럼 작성했는데,
error: (conn=61476, no: 1366, SQLState: 22007) Incorrect integer value: '적합' for column `db_mmap`.`tb_int_attendlist_spc`.`fixed_id` at row 1
// 이렇게 에러가 뜨는데, fixed_id 컬럼은 문자인데, 어떤 부분이 문제인지 모르겠습니다,
set
fixed_id = case when fixed_id = '0' then '부적합'
when fixed_id = '1' then '적합'
fixed_id에 '부적합', '적합'을 입력하려해서 그런것 같네요.
fixed_id 가 int 형으로 만들어져 있는지 확인해보세요. 오류 메시지에는 int형으로 만들어져 있다고 나오네요.