存储过程加参数 date 类型
select ... c.time ,
...
from t_person_info c
存储过程加参数 date 类型
select ... c.time ,
...
from t_person_info c
left join (select...time
from t_person_info where 1=1
group by nyunit_code, rylb,time) a on a.NYUNIT_CODE =
c.NYUNIT_CODE
and a.time=c.time
left join (select...time
from t_person_info where 1=1
group by nyunit_code, rylb, dna_flag,time) b on b.NYUNIT_CODE =
c.NYUNIT_CODE
and b.time=c.time
and b.rylb = a.rylb
where 1 = 1 ...
把语句变成存储过程 并把 time 变成参数传进来
展开
全部