workflow表单中表格绑定登记薄表sql语句的问题

workflow表单中表格绑定登记薄表sql语句的问题

绑定登记薄表的方法改为

select * from tdcb_djb

 where sjzt <> -1   and qzbm like '[$ dwdm]%'  
and  (qzbm like '%[$ keyword]%' or fbfbm like '%[$ keyword]%' or ztbm like '%[$ keyword]%'
      or (fbfbm in(select fbfbm from tdcb_fbf where fbfmc like '%[$ keyword]%' ))
     or (ztbm in(select ztbm from tdcb_qszt where ztmc like '%[$ keyword]%')) )

数据模型中
登记薄表中字段ztbm和fbfbm改为引用模式
绑定sql语句为:

ztbm引用:
表达式:select ztbm,ztmc from tdcb_qszt
显示字段:ztmc     值字段:ztbm
fbfbm引用:
表达式:select fbfbm,fbfmc from tdcb_fbf
显示字段:fbfmc     值字段:fbfbm

原sql语句在做select count(*) from (SQL) t 时报错,是因为sql语句返回的字段有多个相同字段,来源不同的表的原因。
ztbm(tdcb_djb,tdcb_qszt)
fbfbm(tdcb_djb,tdcb_fbf)…
如原sql语句为:

select * from tdcb_djb
,tdcb_qszt,tdcb_fbf
where tdcb_djb.ztbm=tdcb_qszt.ztbm  and
      tdcb_djb.fbfbm=tdcb_fbf.fbfbm
and tdcb_djb.qzbm like '[$ dwdm]%'  
and  (tdcb_djb.qzbm like '%[$ keyword]%' or tdcb_djb.fbfbm like '%[$ keyword]%' or tdcb_djb.ztbm like '%[$ keyword]%'
      or tdcb_fbf.fbfmc like '%[$ keyword]%' or tdcb_qszt.ztmc like '%[$ keyword]%') and tdcb_djb.sjzt <> -1

表单中表格字段绑定方法为:

承包方绑定为:tdcb_djb.ztbm
发包方绑定为:tdcb_djb.fbfbm
字段代码(通过数据模型中绑定的引用参数)自动翻译为中文。

—the—end—

你可能感兴趣的:(旭普运维)