欧博Remove records from Select when both conditions

You just need to change the AND/OR logic around a bit.

with timesheets as (select $1 employee_id, $2 position_id, $3 external_payroll_code from values ('1A', '0000087544', 'SUPA'), ('1B', '00000888888', 'SUPA')) select * from timesheets where not (external_payroll_code in ('SUPA') and position_id in ('0000087544')) EMPLOYEE_ID POSITION_ID EXTERNAL_PAYROLL_CODE 1B 00000888888 SUPA

2025-08-28 00:27 点击量:1