You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.3 KiB
SQL

select vv.* from
(
select
ltrim(
rtrim(SUBSTRING(
substring( ,charindex('number',v.,1)+6,LEN(v.)-charindex('number',v.,1)),1
,LEN(substring( ,charindex('number',v.,1)+6,LEN(v.)-charindex('number',v.,1)))-
LEN(' is now available'))
)
) as tdh
from
(select m.id,m.,m.,m.,DATEDIFF(mi,m.,m.)as minYsh
from t_op_seae_edi_mail m where like '%origin%'and >=cast('2017-11-30' as date) and <cast('2017-12-1' as date)
)v
)
vv
where tdh not in
(
select t. -- , t.任务类型
from t_op_task t where t.>=CAST('2017-11-30' as datetime) and <CAST('2017-12-1' as datetime)
and t.='ORIGINAL'
)
-------------
select count(tsk.pl_id) as ncount from
(select t.pl_id,t., from t_op_task t where t.=1 and t.='VC' and t.=0)tsk join
(select ,,, from t_op_seae where ='普通货' ) s
on tsk.=s. and ='DEMO-SA'
------------
update t_op_task set = v.,sea=v.,=0 ,= isnull(,'')+'(重新匹配任务)' from
(
---select
select ,tsk.pl_id,tsk.,s.,s. from
(select t.pl_id,t., from t_op_task t where t.=1 and t.='VC' and t.=0)tsk join
(select ,,, from t_op_seae where ='普通货' ) s
on tsk.=s.
--select
) v where t_op_task.pl_id = v.pl_id
-----
select * from t_op_seae_edi_mail m where between CAST('2017-12-05' as DATEtime) and
CAST ('2017-12-06' as datetime)
select ID ,COUNT(1) from t_op_seae_edi_mail m where between CAST('2017-12-05' as DATEtime) and
CAST ('2017-12-06' as datetime) group by ID having(COUNT(1)>1);
select * from t_op_seae_edi_mail where ID in(
select ID from t_op_seae_edi_mail m where between CAST('2017-12-05' as DATEtime) and
CAST ('2017-12-06' as datetime) group by ID having(COUNT(1)>1)) order by id
select COUNT(1) as ncount from t_op_task t where t.='' and t.='ORIGINAL' AND =0
select isnull(SEA,'') as SEA,* from t_op_task t where t.='ORIGINAL' and t.='b75e124ee732401e8f1240b7c5286d68'AND =0