--查询无审核人单据
SELECT CODE AS 单据号 ,maker as 制单人 ,makerid as 制单人id,auditor as 审核人 ,auditorid 审核人id
, voucherdate as 单据日期 , auditeddate 审核日期
FROM ST_RDRecord
where auditor is null AND voucherdate between '2023-01-01' and '2023-12-31'
--更新数据库表。让审核人信息等于制单人信息
update ST_RDRecord
set auditor = maker,auditorid =auditorid,auditeddate=voucherdate
where where auditor is null AND voucherdate between '2023-01-01' and '2023-12-31'