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.
D6JIEFENGMAIL/doc/sql/debug_BC箱型数量与系统中对照.sql

46 lines
2.2 KiB
Transact-SQL

select vtj.,vtj.,vtj.EDI, sum() as from
( select v0.*,cctn.EDI from
( SELECT ctn.[编号],s.,[数量],[表现形式]
FROM (select te.,te. from t_op_seae te where ='普通货' AND in('574055195'
)) s
join [dbo].[t_op_ctn] ctn on ctn.=s.) v0 join t_code_ctn cctn on v0.=cctn.
) vtj group by vtj.,vtj.,vtj.EDI
select top 20 * , t.,t. as SEA from t_op_seae t
select * from t_op_seae_ftpfile_bc
select b.F_TSR_TSR, * from t_op_seae_edi_rp_iftmbc b
select distinct -- s.运费协议号,s.运输方式,
s. from t_op_seae s
----
select * from t_op_
INSERT INTO [t_op_task]
([任务编号] ,[上级任务号],[任务类型],[任务来源],[任务状态],[任务说明]
,[发起人] ,[录入日期] ,[任务开始时间] ,[完成方式] ,[完成时间] ,[KPI值]
,[提单号],[文件编号],[邮件编号],[电子档案路径],[是否公共],[任务相关人员],[SEA编号])
VALUES({0},NULL,'IFTMBC','FTP','未开始',{1},
'DEMO-SA',getdate(),{2},'手动',NULL,NULL,
{3},{4},NULL,{5},{6},{7},{8};
----
select v1.*,case when sea. IS null then 1 else 0 end as , sea.,sea. from
(
SELECT newid() as [任务编号],null as [上级任务号], [fileType] as [任务类型],
'FTP' as [任务来源],
case [fileType] when 'ADVANCE' then '未开始' when 'APPROVED' then '挂单待确认'
when 'ORIGINAL' then '等待挂单' when 'SEAWAY' then '挂单待确认' else '未开始' end as [任务状态],
case [fileType] when 'ADVANCE' then 'Verify Copy' when 'APPROVED' then '已获得贵司确认的copy'
when 'ORIGINAL' then '正本提单' when 'SEAWAY' then 'Seaway Bill' else [fileType] end [任务说明],
'DEMO-SA' as [发起人],GETDATE() as [录入日期],lastmodi_date as[任务开始时间], '手动' as [完成方式],null as [完成时间] ,null as [KPI值] ,
'' as [业务编号],
ReportID as [文件编号], null as [邮件编号],
[local_path] +'\'+ [ftp_filename] as [电子档案路径] from t_op_seae_ftpfile_bc
where ReportID='ea1dfd4067d54c31a57a8924dc1e3952'
) v1 left join (select s.,s.,s.,s. from t_op_seae s where s.='普通货' )
sea on v1.[业务编号]=sea.