SQLlite每月生成应交日期截止到截止日期
时间:2020-05-28 访问量:1133
insert into 应交租金明细(业务编号,姓名,电话,型号,编号,租金,车牌号,地区,骑手地址,身份证号,公司,应交日期,状态,是否已交)
select ':业务编号' as 业务编号,':姓名' as 姓名,':电话' as 电话,':型号' as 型号,':编号' as 编号,:租金 as 租金,':车牌号' as 车牌号,':地区' as 地区,
':骑手地址' as 骑手地址,':身份证号' as 身份证号,':公司' as 公司,date(':日期','+' ||号 || ' month') as 应交日期,'租用' as 状态,'False' as 是否已交
from 序列
where date(':日期','+' ||号 || ' month')<=':截止日期'
and date(':日期','+' ||号 || ' month') not in (select 应交日期 from 应交租金明细 where 业务编号=':业务编号')