
这个单据状态:计划、确认、下达、结案 分别对应的sql如下
--计划
Select top 20000 v1.FBillNo as FBillNo,v1.FStatus as FStatus,v1.FTranType as FTranType,v1.FInterID as FInterID,
case when v1.FCancellation=1 then 'Y' else '' end as FCancellation,CASE V1.FSuspend WHEN 0 THEN '' ELSE 'Y' END as FSuspend,t9.FQtyDecimal as FQtyDecimal,
v1.FType as FICMOType2,v1.FWorktypeID as FWorkTypeID2, 0 As FBOSCloseFlag from ICMO v1 INNER JOIN t_ICItem t9 ON v1.FItemID = t9.FItemID AND t9.FItemID<>0
where 1=1 AND (v1.FTranType = 85 AND ( v1.FType <> 11060 ) AND (v1.FStatus=0 AND v1.FCancellation = 0)) order by v1.FInterID
---确认
Select top 20000 v1.FBillNo as FBillNo,v1.FStatus as FStatus,v1.FTranType as FTranType,v1.FInterID as FInterID,
case when v1.FCancellation=1 then 'Y' else '' end as FCancellation,CASE V1.FSuspend WHEN 0

这些SQL查询用于获取ICMO表中不同状态(计划、确认、下达、结案)的记录,主要依据FTranType、FStatus和FCancellation字段过滤数据,同时包含FItemID等相关信息。
最低0.47元/天 解锁文章
3588

被折叠的 条评论
为什么被折叠?



