员工调度系统


扬尘
2025-04-08 10:45:00 (3天前)


我有员工表,我试图只查询时间戳范围内的员工。

选择
emp_fn_name,emp_fn_name,
TO_TIMESTAMP(e.start_time,‘HH12:MIAM,PM’)::时间,


2 条回复
  1. 0# CC-f | 2019-08-31 10-32



    我想你想要:




    1. select emp_fn_name, emp_fn_name
      from employees e
      where not exists (select 1
      from schedule s
      where s.emp_id = e.id and
      s.start < 03:00PM’::time and
      s.end > 02:00PM’::time
      );

    2. </code>

登录 后才能参与评论